diff options
author | Xavier Noria <fxn@hashref.com> | 2011-05-25 22:48:47 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-05-25 22:48:47 +0200 |
commit | 00e1d0832e1242fe41cf43490b0a3a21a40f3c26 (patch) | |
tree | 06d3fcf35727a37f78885fc63fe15ff265aa309a /activerecord/lib/active_record/persistence.rb | |
parent | d25b7c2eeefff3a0abf7b532c10ce25a71d0fba2 (diff) | |
parent | 03f418370a4266e414ff32706381bb2b60baadfc (diff) | |
download | rails-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.rb | 2 |
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) |