Touch callback does not always create version#1285
Touch callback does not always create version#1285jaredbeck merged 1 commit intopaper-trail-gem:masterfrom
Conversation
|
Hi @jaredbeck, I hope you're well. This looks good to me. Does this look good to you? |
|
Do you know why the tests are failing? Looks like the tests need to be updated? |
I think it's due to a difference in behavior in ActiveRecord's handling of touch and dirty attributes from Rails 5 to Rails 6. I don't think it's possible to support this new functionality with Rails 5 which is why the tests are failing (and possibly why the previous implementation set |
I wonder why. Touch-tracking was implemented by @westonganger in 02b6de2. Weston, do you remember why
Yes, if the differences are thoroughly documented. |
|
Well I see that in 02b6de2 there was no option for 02b6de2#diff-1f8592ba4c3060dd4ee3248e4104efc57d55d350f3234cf8562a55825b949dc0R123 |
1a0c6d3 to
435421d
Compare
435421d to
16ad921
Compare
|
Released in 12.1.0 |
Before paper-trail-gem#1285, a version record was created when associated object is touched. But because of Rails don't track implicit touch mutation[1], now PaperTail don't create a version record was created when associated object is touched. This patch try to keep creating a version record in that case by doing checking an event and changed value. Fixes paper-trail-gem#1339. [1]: rails/rails@dcb8259
Before paper-trail-gem#1285, a version record was created when associated object is touched. But because of Rails don't track implicit touch mutation[1], now PaperTail don't create a version record was created when associated object is touched. This patch try to keep creating a version record in that case by doing checking an event and changed value. Fixes paper-trail-gem#1339. [1]: rails/rails@dcb8259
Before paper-trail-gem#1285, a version record was created when associated object is touched. But because of Rails don't track implicit touch mutation[1], now PaperTail don't create a version record was created when associated object is touched. This patch try to keep creating a version record in that case by doing checking an event and changed value. Fixes paper-trail-gem#1339. [1]: rails/rails@dcb8259
Currently
touchwith an ignored or skipped attribute will still create a new version. This changes the behavior to make it consistent withupdatecallback.