method

define_method_attribute

rails latest stable - Class: ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.0.0.1) is shown here.

define_method_attribute(attr_name)
public

No documentation available.

# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 55
        def define_method_attribute(attr_name)
          super

          if attr_name == primary_key && attr_name != 'id'
            generated_attribute_methods.send(:alias_method, :id, primary_key)
          end
        end