mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add more doc to #update_column.
This commit is contained in:
parent
ad3e057e48
commit
bf50935a5d
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue