diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-09 03:07:08 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-09 03:07:08 +0930 |
commit | 5c17e34946457b9af428bcf955eb65493257dc3e (patch) | |
tree | bc76a1000911cf0e9ddb89d02bf129ab06101425 /activerecord/lib/active_record/persistence.rb | |
parent | 1990c8f9b63aaa3b766c8ddf745f25cf8822b332 (diff) | |
parent | dff37ff613d12201c2b770dbc61b125792c7bb6e (diff) | |
download | rails-5c17e34946457b9af428bcf955eb65493257dc3e.tar.gz rails-5c17e34946457b9af428bcf955eb65493257dc3e.tar.bz2 rails-5c17e34946457b9af428bcf955eb65493257dc3e.zip |
Merge pull request #29495 from eugeneius/_write_attribute
Improve the performance of writing attributes
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index b2dba5516e..a9509e562a 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -333,7 +333,7 @@ module ActiveRecord updated_count = self.class.unscoped.where(self.class.primary_key => id).update_all(attributes) attributes.each do |k, v| - raw_write_attribute(k, v) + write_attribute_without_type_cast(k, v) end updated_count == 1 |