Feature: Ability to group changes
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?
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.
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.
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.
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.
Maybe. Everything in a block can be unwrapped of course.