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/read.rb, line 11
          def define_method_attribute(name)
            ActiveModel::AttributeMethods::AttrNames.define_attribute_accessor_method(
              generated_attribute_methods, name
            ) do |temp_method_name, attr_name_expr|
              generated_attribute_methods.module_eval                 def #{temp_method_name}                  name = #{attr_name_expr}                  _read_attribute(name) { |n| missing_attribute(n, caller) }                end, __FILE__, __LINE__ + 1
            end
          end
Register or log in to add new notes.