Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Ability to group changes #144

Open
ajsharp opened this issue Jan 4, 2016 · 5 comments
Open

Feature: Ability to group changes #144

ajsharp opened this issue Jan 4, 2016 · 5 comments

Comments

@ajsharp
Copy link

ajsharp commented Jan 4, 2016

It would be very useful to be able to group a series of small updates / changes into a single changeset. Presumably a changeset would be determined by the same modifier making a group of updates in a continuous time period. Has this been discussed before?

@dblock
Copy link
Collaborator

dblock commented Jan 5, 2016

It hasn't. Do you have a good story where you think this is useful?

Personally, I think the history records always wants to correspond to a single write, otherwise I would try to do multiple assignments to a record then call .save! in my own code to the record.

@ajsharp
Copy link
Author

ajsharp commented Jan 5, 2016

Yea, you could certainly argue that this is more of a presentation / reporting concern. The use case is you do a bunch of small updates, and then in the UI, you want to show all of those updates grouped together -- "Alex updated this record with these 9 changes" -- and you view the details of the changes made.

@dblock
Copy link
Collaborator

dblock commented Jan 6, 2016

I think it could be nice. For example:

instance.track_history do
 # changes go here
end
# changes combined into a single one

That would accumulate the changes. Need to figure out what to do with redo!, undo! and what not.

@ajsharp
Copy link
Author

ajsharp commented Jan 6, 2016

Maybe it's more of a reporting concern than a tracking one? My use case wouldn't allow for capturing the changes in a block like that -- they happen every time a form field is blurred.

@dblock
Copy link
Collaborator

dblock commented Jan 6, 2016

Maybe. Everything in a block can be unwrapped of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants