diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-04 17:22:09 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2015-10-04 17:22:09 -0600 |
commit | 0b51103664943f3937dbc7eeaf87e01f1ec40d77 (patch) | |
tree | ca96ad300bb0823346df2bb439993d6035f04788 /activerecord | |
parent | 5c2f182e2d56a92afffbd31253dbae1edf5f08ab (diff) | |
parent | dc96af159ddb220fe87825d8538d7c4e86da995b (diff) | |
download | rails-0b51103664943f3937dbc7eeaf87e01f1ec40d77.tar.gz rails-0b51103664943f3937dbc7eeaf87e01f1ec40d77.tar.bz2 rails-0b51103664943f3937dbc7eeaf87e01f1ec40d77.zip |
Merge pull request #21867 from akihiro17/fix-relation-doc
[ci skip] Fix ActiveRecord::Relation#update documentation
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index e596df8742..36cdeed489 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -400,11 +400,11 @@ module ActiveRecord # people = Person.where(group: 'expert') # people.update(group: 'masters') # - # Note: Updating a large number of records will run a - # UPDATE query for each record, which may cause a performance - # issue. So if it is not needed to run callbacks for each update, it is - # preferred to use <tt>update_all</tt> for updating all records using - # a single query. + # Note: Updating a large number of records will run an + # UPDATE query for each record, which may cause a performance + # issue. So if it is not needed to run callbacks for each update, it is + # preferred to use <tt>update_all</tt> for updating all records using + # a single query. def update(id = :all, attributes) if id.is_a?(Array) id.map.with_index { |one_id, idx| update(one_id, attributes[idx]) } |