aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-04-09 10:27:45 +0900
committerGitHub <noreply@github.com>2018-04-09 10:27:45 +0900
commitbc9fb9cf8b5dbe8ecf399ffd5d48d84bdb96a9db (patch)
treeee77eb11f5cc7ff60a1096801dc89b06b456c770 /activerecord/lib/active_record
parentd729bc748811339c7e536f4ca98e91801e14c6f4 (diff)
parentb9e1c0c4d7c67a65c2ea63e7f0925f4d0da306aa (diff)
downloadrails-bc9fb9cf8b5dbe8ecf399ffd5d48d84bdb96a9db.tar.gz
rails-bc9fb9cf8b5dbe8ecf399ffd5d48d84bdb96a9db.tar.bz2
rails-bc9fb9cf8b5dbe8ecf399ffd5d48d84bdb96a9db.zip
Merge pull request #32497 from eugeneius/mutation_tracker_changed_attribute_names
Avoid generating full changes hash on every save
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_methods/dirty.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/dirty.rb b/activerecord/lib/active_record/attribute_methods/dirty.rb
index 3de6fe566d..7224f970e0 100644
--- a/activerecord/lib/active_record/attribute_methods/dirty.rb
+++ b/activerecord/lib/active_record/attribute_methods/dirty.rb
@@ -114,7 +114,7 @@ module ActiveRecord
# Alias for +changed+
def changed_attribute_names_to_save
- changes_to_save.keys
+ mutations_from_database.changed_attribute_names
end
# Alias for +changed_attributes+