method

inherited

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::Migration
inherited(subclass) public

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/migration.rb, line 601
    def self.inherited(subclass) # :nodoc:
      super
      if subclass.superclass == Migration
        major = ActiveRecord::VERSION::MAJOR
        minor = ActiveRecord::VERSION::MINOR
        raise StandardError, "Directly inheriting from ActiveRecord::Migration is not supported. "            "Please specify the Active Record release the migration was written for:\n"            "\n"            "  class #{subclass} < ActiveRecord::Migration[#{major}.#{minor}]"
      end
    end
Register or log in to add new notes.