Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Integrate versioning into AR touch method #1063
Something to consider with this PR is the following lines:
Currently it will attach to the
Good thinking. I think the callback should be installed by default, but configurable via the
referenced this pull request
Apr 2, 2018
Is there a way to globally disable the tracking of the touch event? Or more generically, set the default /create/update/destroy/touch global 'on:' defaults ?
As implemented, it breaks when using the delay_touching gem (specific case is when a delayed touch is for a record that was marked for destruction, the attempt to create the version association in record_update() in record_trail.rb throws an exception because the @record no longer is persisted (as it was deleted before the touch events are fired - touch having been delayed as the function of the delay_touching gem).
Given this was not the default behavior before and the alternative is updating potentially hundreds of models (we have a pretty large app) to disable on: :touch, I'd much rather have a PaperTrail.config.xxxx setting once.
We upgraded from 7.x to 10.x and had this break (it worked before, likely because it was before touch versioning was done)