aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-25 22:59:40 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-25 23:02:30 -0300
commitcffaca491fcfd84988377e5258b0938e588350bb (patch)
tree5187b6a15979b4379a9e0dd4f65b665a99909251 /activerecord/lib
parente5195be2d9efaee18e9204d00cdcd0a92ee407ac (diff)
downloadrails-cffaca491fcfd84988377e5258b0938e588350bb.tar.gz
rails-cffaca491fcfd84988377e5258b0938e588350bb.tar.bz2
rails-cffaca491fcfd84988377e5258b0938e588350bb.zip
Use verify_readonly_attribute in the update_columns method
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/persistence.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 9c0a292a09..ffb8513624 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -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|