diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-05-26 18:20:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-26 18:20:49 -0400 |
commit | b0dc26f57f5fec4790c78a49cede1557561ca724 (patch) | |
tree | c2fba02c26bedc661a4161f44a330f90c08afd66 /activerecord/lib/active_record | |
parent | 70d6f400c24e38a33f79240ee49fc6470f48f8b3 (diff) | |
parent | 235836ae58605931f72ecaef95363aa6784eb977 (diff) | |
download | rails-b0dc26f57f5fec4790c78a49cede1557561ca724.tar.gz rails-b0dc26f57f5fec4790c78a49cede1557561ca724.tar.bz2 rails-b0dc26f57f5fec4790c78a49cede1557561ca724.zip |
Merge pull request #29237 from mohitnatoo/arel-update-doc
[ci skip] Changed sentence formation for ActiveRecordRelation#update
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 2d5be32266..86b77a7cec 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -403,9 +403,9 @@ module ActiveRecord # # 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 #update_all for updating all records using - # a single query. + # issue. When running callbacks is not needed for each record update, + # it is preferred to use #update_all for updating all records + # in 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]) } |