diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-12-25 15:18:10 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-12-25 15:21:30 +0900 |
commit | 732aa34b6e6459ad66a3d3ad107cfff75cc45160 (patch) | |
tree | 6a3382653bf736cc71d23410c8a1b0b337b8e7f7 /activerecord/test/cases | |
parent | 91a4a820feeb878dd1b388befa56dd469933d17c (diff) | |
parent | c53287b2370af2b011cdc4c583a50fbcd6fd88ed (diff) | |
download | rails-732aa34b6e6459ad66a3d3ad107cfff75cc45160.tar.gz rails-732aa34b6e6459ad66a3d3ad107cfff75cc45160.tar.bz2 rails-732aa34b6e6459ad66a3d3ad107cfff75cc45160.zip |
Merge pull request #27780 from mikelikesbikes/fix-update-attribute-callbacks-issue
save attributes changed by callbacks after update_attribute
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/persistence_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index 07c4a17fb1..0fa8ea212f 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -633,6 +633,9 @@ class PersistenceTest < ActiveRecord::TestCase Topic.find(1).update_attribute(:approved, false) assert !Topic.find(1).approved? + + Topic.find(1).update_attribute(:change_approved_before_save, true) + assert Topic.find(1).approved? end def test_update_attribute_for_readonly_attribute |