ISORSA
Updated 609 days ago
In rails 5 we need to use ActiveRecord::MigrationContext instead of ActiveRecord::Migrator...
In Rails application we don't have to worry about requiring or loading its classes (as opposite to Ruby apps, gems or React apps). For example, when we add a new controller PostsController, we don't have to require ApplicationController or Post model. Everything is autoloaded for us, unless we need to load stuff from lib/ directory...
In PostsController, constants defined with and keywords will not trigger autoloading, but ApplicationController is unknown, the constant is missing and Rails will try to autoload the constant. Rails iterates over autoload_paths.