aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-05-25 22:48:47 +0200
committerXavier Noria <fxn@hashref.com>2011-05-25 22:48:47 +0200
commit00e1d0832e1242fe41cf43490b0a3a21a40f3c26 (patch)
tree06d3fcf35727a37f78885fc63fe15ff265aa309a /activerecord/lib/active_record/persistence.rb
parentd25b7c2eeefff3a0abf7b532c10ce25a71d0fba2 (diff)
parent03f418370a4266e414ff32706381bb2b60baadfc (diff)
downloadrails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.tar.gz
rails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.tar.bz2
rails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.zip
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index e84a479a13..4ec0431b8c 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -137,6 +137,8 @@ module ActiveRecord
# * Callbacks are skipped.
# * updated_at/updated_on column is not updated if that column is available.
#
+ # Raises an +ActiveRecordError+ when called on new objects, or when the +name+
+ # attribute is marked as readonly.
def update_column(name, value)
name = name.to_s
raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name)