Methods
Instance Protected methods
# File activerecord/lib/active_record/attribute_methods/write.rb, line 12 12: def define_method_attribute=(attr_name) 13: if attr_name =~ ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP 14: generated_attribute_methods.module_eval("def #{attr_name}=(new_value); write_attribute('#{attr_name}', new_value); end", __FILE__, __LINE__) 15: else 16: generated_attribute_methods.send(:define_method, "#{attr_name}=") do |new_value| 17: write_attribute(attr_name, new_value) 18: end 19: end 20: end