diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-05-20 21:56:08 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-05-20 21:56:08 -0300 |
commit | bf50935a5dc1e41d4134ae975cc01886b722c13d (patch) | |
tree | 7662506908e84919384522034bcdc31b34057b5d /activerecord/lib | |
parent | ad3e057e4878a3abc7c30210cbf15680b359a2fb (diff) | |
download | rails-bf50935a5dc1e41d4134ae975cc01886b722c13d.tar.gz rails-bf50935a5dc1e41d4134ae975cc01886b722c13d.tar.bz2 rails-bf50935a5dc1e41d4134ae975cc01886b722c13d.zip |
Add more doc to #update_column.
Diffstat (limited to 'activerecord/lib')
-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 b9041f44d8..221823364c 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -133,6 +133,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) |