mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use verify_readonly_attribute in the update_columns method
This commit is contained in:
parent
e5195be2d9
commit
cffaca491f
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ module ActiveRecord
|
|||
raise ActiveRecordError, "can not update on a new record object" unless persisted?
|
||||
|
||||
attributes.each_key do |key|
|
||||
raise ActiveRecordError, "#{key.to_s} is marked as readonly" if self.class.readonly_attributes.include?(key.to_s)
|
||||
verify_readonly_attribute(key.to_s)
|
||||
end
|
||||
|
||||
attributes.each do |k,v|
|
||||
|
|
Loading…
Reference in a new issue