edge badge
Methods
#
A
G
I
Instance Public methods
===(object)

Overwrite the default class equality method to provide support for association proxies.

# File activerecord/lib/active_record/core.rb, line 236
def ===(object)
  object.is_a?(self)
end
allocate()
# File activerecord/lib/active_record/core.rb, line 125
def allocate
  define_attribute_methods
  super
end
generated_association_methods()
# File activerecord/lib/active_record/core.rb, line 211
def generated_association_methods
  @generated_association_methods ||= begin
    mod = const_set(:GeneratedAssociationMethods, Module.new)
    include mod
    mod
  end
end
inspect()

Returns a string like 'Post(id:integer, title:string, body:text)'

# File activerecord/lib/active_record/core.rb, line 220
def inspect
  if self == Base
    super
  elsif abstract_class?
    "#{super}(abstract)"
  elsif !connected?
    "#{super} (call '#{super}.connection' to establish a connection)"
  elsif table_exists?
    attr_list = attribute_types.map { |name, type| "#{name}: #{type.type}" } * ', '
    "#{super}(#{attr_list})"
  else
    "#{super}(Table doesn't exist)"
  end
end