Attributes listed as readonly can be set for a new record, but will be ignored in database updates afterwards.
Source Code
# File active_record/base.rb, line 863 def attr_readonly(*attributes) write_inheritable_attribute("attr_readonly", Set.new(attributes.map(&:to_s)) + (readonly_attributes || [])) end
<code/>and<pre/>for code samples.