mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Merge pull request #1001 from seanlinsley/patch-1
Fix callback to only run before update
This commit is contained in:
commit
0bc9eb1f5f
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ module PaperTrail
|
|||
|
||||
# Adds a callback that records a version after an "update" event.
|
||||
def on_update
|
||||
@model_class.before_save(on: :update) { |r|
|
||||
@model_class.before_save { |r|
|
||||
r.paper_trail.reset_timestamp_attrs_for_update_if_needed
|
||||
}
|
||||
@model_class.after_update { |r|
|
||||
|
|
Loading…
Reference in a new issue