Permalink
Browse files

Use verify_readonly_attribute in the update_columns method

  • Loading branch information...
1 parent e5195be commit cffaca491fcfd84988377e5258b0938e588350bb @rafaelfranca rafaelfranca committed Aug 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/persistence.rb
@@ -232,7 +232,7 @@ def update_columns(attributes)
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|

0 comments on commit cffaca4

Please sign in to comment.