Files

Class Index [+]

Quicksearch

ActiveRecord::AttributeMethods::Write::ClassMethods

Protected Instance Methods

define_method_attribute=(attr_name) click to toggle source
    # File 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

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.