nil attr_writer :application def application @application ||= (app_class.instance if app_class) end # The Configuration instance used to configure the Rails environment def configuration application.config end def root application && application.config.root end def env @_env ||= ActiveSupport::StringInquirer.new( ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || “development" ) end end end
do ActiveSupport.on_load(:active_record) do self.time_zone_aware_attributes = true self.default_timezone = :utc end end initializer "active_record.logger" do ActiveSupport.on_load(:active_record) { self.logger ||= ::Rails.logger } end initializer "active_record.check_schema_cache_dump" do # ... end end end