Method: ActiveRecord::AttributeMethods::Write#write_attribute

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

#write_attribute(attr_name, value) ⇒ Object

Updates the attribute identified by attr_name with the specified value. Empty strings for fixnum and float columns are turned into nil.



57
58
59
# File 'lib/active_record/attribute_methods/write.rb', line 57

def write_attribute(attr_name, value)
  write_attribute_with_type_cast(attr_name, value, :type_cast_attribute_for_write)
end