Flowdock
define_method_attribute=(name) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/attribute_methods/write.rb, line 15
          def define_method_attribute=(name)
            safe_name = name.unpack("h*".freeze).first
            ActiveRecord::AttributeMethods::AttrNames.set_name_cache safe_name, name
            sync_with_transaction_state = "sync_with_transaction_state" if name == primary_key

            generated_attribute_methods.module_eval               def __temp__#{safe_name}=(value)                name = ::ActiveRecord::AttributeMethods::AttrNames::ATTR_#{safe_name}                #{sync_with_transaction_state}                _write_attribute(name, value)              end              alias_method #{(name + '=').inspect}, :__temp__#{safe_name}=              undef_method :__temp__#{safe_name}=, __FILE__, __LINE__ + 1
          end
Register or log in to add new notes.