diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-29 16:54:14 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-29 17:14:48 +0900 |
commit | 5fd226e5f4e7d53f3acb433f00d1a8808cf7af82 (patch) | |
tree | 7d3c00892603c3fca8c62b6a1420dc23f241bb61 | |
parent | 3c90818129e9e295f35c928317c55c111a43d8a9 (diff) | |
download | rails-5fd226e5f4e7d53f3acb433f00d1a8808cf7af82.tar.gz rails-5fd226e5f4e7d53f3acb433f00d1a8808cf7af82.tar.bz2 rails-5fd226e5f4e7d53f3acb433f00d1a8808cf7af82.zip |
Add missing `emit_warning_if_needed` for `changed?`
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/dirty.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb index e20b65e43c..b0e1391cb9 100644 --- a/activerecord/lib/active_record/attribute_methods/dirty.rb +++ b/activerecord/lib/active_record/attribute_methods/dirty.rb @@ -226,6 +226,11 @@ module ActiveRecord super end + def changed?(*) + emit_warning_if_needed("changed?", "saved_changes?") + super + end + def changed(*) emit_warning_if_needed("changed", "saved_changes.keys") super |