diff options
author | Eugene Kenny <elkenny@gmail.com> | 2017-07-07 00:53:02 +0100 |
---|---|---|
committer | Eugene Kenny <elkenny@gmail.com> | 2017-07-07 00:53:02 +0100 |
commit | dff37ff613d12201c2b770dbc61b125792c7bb6e (patch) | |
tree | 6336cb2af1e6dd6aae55fe05033058c8716881bd /activerecord/lib/active_record/persistence.rb | |
parent | c879649a733d982fba9e70f5a280d13636b67c37 (diff) | |
download | rails-dff37ff613d12201c2b770dbc61b125792c7bb6e.tar.gz rails-dff37ff613d12201c2b770dbc61b125792c7bb6e.tar.bz2 rails-dff37ff613d12201c2b770dbc61b125792c7bb6e.zip |
Rename raw_write_attribute to write_attribute_without_type_cast
This name more accurately describes what the method does, and also
disambiguates it from `_write_attribute`, which ignores aliases.
We can also make the method private, since it's not public API and only
called from one place - `update_columns` - without an explicit receiver.
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 f652c7c3a1..669c838405 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 |