aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-11-24 19:46:00 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-11-24 19:46:00 -0200
commit9f33e3daab02304e768e7391940fe29290f3c3bf (patch)
treed4433b8657a4b8712f2be4a6f71cc74fedd8289f
parent4d157ea8c15186c4903fa83f2dc51a5f78d13a37 (diff)
parent91c0c277698ab6ca4132a580f4212aa913492a8c (diff)
downloadrails-9f33e3daab02304e768e7391940fe29290f3c3bf.tar.gz
rails-9f33e3daab02304e768e7391940fe29290f3c3bf.tar.bz2
rails-9f33e3daab02304e768e7391940fe29290f3c3bf.zip
Merge pull request #17682 from ReneB/docs/update_all
Explain that default_scope also influences update_all
-rw-r--r--activerecord/lib/active_record/relation.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index 460daf99bc..561ed222d1 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -304,11 +304,11 @@ module ActiveRecord
klass.current_scope = previous
end
- # Updates all records with details given if they match a set of conditions supplied, limits and order can
- # also be supplied. 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 ActiveRecord's type-casting behavior.
- # It should receive only values that can be passed as-is to the SQL database.
+ # 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
+ # ActiveRecord's type-casting behavior. It should receive only values that can be passed as-is to the SQL
+ # database.
#
# ==== Parameters
#