Module ActiveRecord::Inheritance::ClassMethods
In: lib/active_record/inheritance.rb

Methods

Attributes

abstract_class  [RW]  Set this to true if this is an abstract class (see abstract_class?).

Public Instance methods

Returns whether this class is an abstract class or not.

Returns the base AR subclass that this class descends from. If A extends AR::Base, A.base_class will return A. If B descends from A through some arbitrarily deep hierarchy, B.base_class will return A.

If B < A and C < B and if A is an abstract_class then both B.base_class and C.base_class would return B as the answer since A is an abstract_class.

True if this isn‘t a concrete subclass needing a STI type condition.

Finder methods must instantiate through this method to work with the single-table inheritance model that makes it possible to create objects of different types from the same table.

Protected Instance methods

Returns the class descending directly from ActiveRecord::Base or an abstract class, if any, in the inheritance hierarchy.

Returns the class type of the record using the current module as a prefix. So descendants of MyApp::Business::Account would appear as MyApp::Business::AccountSubclass.

[Validate]