method

set_base_class

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ClassMethods
set_base_class() protected

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/inheritance.rb, line 263
        def set_base_class # :nodoc:
          @base_class = if self == Base
            self
          else
            unless self < Base
              raise ActiveRecordError, "#{name} doesn't belong in a hierarchy descending from ActiveRecord"
            end

            if superclass == Base || superclass.abstract_class?
              self
            else
              superclass.base_class
            end
          end
        end
Register or log in to add new notes.