X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/497009ed2b98dfdeeb349e891c1fbd88d14ff087..dc2a2c8ebd1a11e4a64555fda22c6859a51defff:/config/application.rb diff --git a/config/application.rb b/config/application.rb index 6a96b9dd6..8ba628c8e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,15 +1,15 @@ -require File.expand_path('../boot', __FILE__) +require File.expand_path("../boot", __FILE__) -require File.expand_path('../preinitializer', __FILE__) +require File.expand_path("../preinitializer", __FILE__) if STATUS == :database_offline -require "action_controller/railtie" -require "action_mailer/railtie" -require "active_model/railtie" -require "sprockets/railtie" -require "rails/test_unit/railtie" + require "action_controller/railtie" + require "action_mailer/railtie" + require "active_model/railtie" + require "sprockets/railtie" + require "rails/test_unit/railtie" else -require 'rails/all' + require "rails/all" end # Require the gems listed in Gemfile, including any gems @@ -39,13 +39,9 @@ module OpenStreetMap # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types - unless STATUS == :database_offline - config.active_record.schema_format = :sql - end + config.active_record.schema_format = :sql unless STATUS == :database_offline # Don't eager load models when the database is offline - if STATUS == :database_offline - config.paths["app/models"].skip_eager_load! - end + config.paths["app/models"].skip_eager_load! if STATUS == :database_offline end end