Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for tracking batch updates #337

Closed
aserafin opened this Issue · 5 comments

3 participants

@aserafin

I have a case when I'm updating bunch of records using update_all for performance reasons. I would still want to be able to keep track of these changes (author and whats changed).

Maybe PaperTrail could expose static method on model, like: User.record_changes(ids = [], changes = {}) that could be called by developer manually?

I think this is pretty common issue and may be worth resolving - I'm open to suggestion and eager to write some code and send pull request once some consensus will be reached.

@batter batter added this to the 3.1.0 milestone
@batter batter self-assigned this
@batter
Collaborator

@aserafin - I think this is a good idea. Would love to put support for this into 4.0.0 (which I'm currently working on). Sorry for the delayed response, but if you want to submit a PR, that would be great. I haven't done a ton of work with batch updates inside of AR aside from wrapping large series of updates in transactions, so you probably know more about it than me.

@batter batter added the Not a bug label
@batter
Collaborator

I know it's late but if you still want to make a PR we can try to get it merged in prior to the 4.0.0 release..

@jaredbeck
Collaborator

Since there hasn't been any activity on this, maybe it makes sense to postpone to a 4.1 release?

Edit: I think it's a good idea, just don't want it to hold up the 4.0 release if no one is working on it.

@batter
Collaborator

Agreed. Still open to contributions / suggestions for how to accomplish this.

@batter batter removed this from the 4.0.0 milestone
@jaredbeck
Collaborator

I'm open to suggestion and eager to write some code and send pull request

I think this is a good idea .. if you want to submit a PR, that would be great.

Again, I think this would be a good feature, but given the lack of activity, my preference is to close the issue. If anyone wants to implement this in the future, please open a PR, thanks!

@jaredbeck jaredbeck closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.