Permalink
Browse files

Add more doc to #update_column.

  • Loading branch information...
1 parent ad3e057 commit bf50935a5dc1e41d4134ae975cc01886b722c13d @smartinez87 smartinez87 committed May 21, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 activerecord/lib/active_record/persistence.rb
@@ -133,6 +133,8 @@ def update_attribute(name, value)
# * 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)

0 comments on commit bf50935

Please sign in to comment.