mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix method name in update! error message [ci skip]
Followup to 562ec582f7
.
This commit is contained in:
parent
f10d814140
commit
fcc83e4738
1 changed files with 2 additions and 2 deletions
|
@ -337,7 +337,7 @@ module ActiveRecord
|
|||
if id.is_a?(Array)
|
||||
if id.any?(ActiveRecord::Base)
|
||||
raise ArgumentError,
|
||||
"You are passing an array of ActiveRecord::Base instances to `update`. " \
|
||||
"You are passing an array of ActiveRecord::Base instances to `update!`. " \
|
||||
"Please pass the ids of the objects by calling `pluck(:id)` or `map(&:id)`."
|
||||
end
|
||||
id.map { |one_id| find(one_id) }.each_with_index { |object, idx|
|
||||
|
@ -348,7 +348,7 @@ module ActiveRecord
|
|||
else
|
||||
if ActiveRecord::Base === id
|
||||
raise ArgumentError,
|
||||
"You are passing an instance of ActiveRecord::Base to `update`. " \
|
||||
"You are passing an instance of ActiveRecord::Base to `update!`. " \
|
||||
"Please pass the id of the object by calling `.id`."
|
||||
end
|
||||
object = find(id)
|
||||
|
|
Loading…
Reference in a new issue