diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-20 21:03:56 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-20 21:03:56 -0300 |
commit | 437f464b391d6b915b2604e668c10740fe638edd (patch) | |
tree | 2b1eded108534ee0ed4ee73f0a15b3adb163bdd3 /activerecord/lib/active_record/associations/builder | |
parent | 26931eb32082b3468dc12df59c4041841f64c510 (diff) | |
parent | 713fc39d93601043e027d5cd9ebcfa08064f9417 (diff) | |
download | rails-437f464b391d6b915b2604e668c10740fe638edd.tar.gz rails-437f464b391d6b915b2604e668c10740fe638edd.tar.bz2 rails-437f464b391d6b915b2604e668c10740fe638edd.zip |
Merge pull request #14979 from brocktimus/master
Making belongs_to: touch behaviour be consistent with save updating updated_at
Diffstat (limited to 'activerecord/lib/active_record/associations/builder')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/belongs_to.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb index 47cc1f4b34..3998aca23e 100644 --- a/activerecord/lib/active_record/associations/builder/belongs_to.rb +++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb @@ -103,7 +103,7 @@ module ActiveRecord::Associations::Builder BelongsTo.touch_record(record, foreign_key, n, touch) } - model.after_save callback + model.after_save callback, if: :changed? model.after_touch callback model.after_destroy callback end |