diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-12-05 06:22:49 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-12-05 06:22:49 -0700 |
commit | c5e5b94c8afe83fb2d2a1a353bdbd1808c232e79 (patch) | |
tree | 64a87060ecd4fb228febee7629946b1feac6cc5c /activerecord | |
parent | b79dedc4b974b3b9e9252e451642c83f8283dcee (diff) | |
parent | ea5ff2bc98a1b9bf4dffe2fdf99786e60493c9c1 (diff) | |
download | rails-c5e5b94c8afe83fb2d2a1a353bdbd1808c232e79.tar.gz rails-c5e5b94c8afe83fb2d2a1a353bdbd1808c232e79.tar.bz2 rails-c5e5b94c8afe83fb2d2a1a353bdbd1808c232e79.zip |
Merge pull request #22492 from RochesterinNYC/patch-1
Add note about serialization to update_columns documentation [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 46c6d8c293..1cb177483a 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -298,6 +298,7 @@ module ActiveRecord # * \Validations are skipped. # * \Callbacks are skipped. # * +updated_at+/+updated_on+ are not updated. + # * However, attributes are serialized with the same rules as ActiveRecord::Relation#update_all # # This method raises an ActiveRecord::ActiveRecordError when called on new # objects, or when at least one of the attributes is marked as readonly. diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index f100476374..2cf19c76c5 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -347,9 +347,8 @@ module ActiveRecord # Updates all records in the current relation with details given. This method constructs a single SQL UPDATE # statement and sends it straight to the database. It does not instantiate the involved models and it does not - # trigger Active Record callbacks or validations. Values passed to #update_all will not go through - # Active Record's type-casting behavior. It should receive only values that can be passed as-is to the SQL - # database. + # trigger Active Record callbacks or validations. However, values passed to #update_all will still go through + # Active Record's normal type casting and serialization. # # ==== Parameters # |