Method: ActiveRecord::AttributeMethods::Write#_write_attribute

Defined in:
activerecord/lib/active_record/attribute_methods/write.rb

#_write_attribute(attr_name, value) ⇒ Object Also known as: attribute=

This method exists to avoid the expensive primary_key check internally, without breaking compatibility with the write_attribute API



41
42
43
# File 'activerecord/lib/active_record/attribute_methods/write.rb', line 41

def _write_attribute(attr_name, value) # :nodoc:
  @attributes.write_from_user(attr_name, value)
end