1
0
Fork 0
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:
Rafael Mendonça França 2012-08-25 22:59:40 -03:00
parent e5195be2d9
commit cffaca491f

View file

@ -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|