1 require_relative "boot"
5 # Require the gems listed in Gemfile, including any gems
6 # you've limited to :test, :development, or :production.
7 Bundler.require(*Rails.groups)
10 class Application < Rails::Application
11 # Initialize configuration defaults for originally generated Rails version.
12 config.load_defaults 7.0
14 # Settings in config/environments/* take precedence over those specified here.
15 # Application configuration can go into files in config/initializers
16 # -- all .rb files in that directory are automatically loaded after loading
17 # the framework and any gems in your application.
19 # Custom directories with classes and modules you want to be autoloadable.
20 config.autoload_paths += %W[#{config.root}/lib]
22 # Force requests from old versions of IE (<= IE8) to be UTF-8 encoded.
23 # This has defaulted to false since rails 6.0
24 config.action_view.default_enforce_utf8 = true
26 # Use SQL instead of Active Record's schema dumper when creating the database.
27 # This is necessary if your schema can't be completely dumped by the schema dumper,
28 # like if you have constraints or database-specific column types
29 config.active_record.schema_format = :sql unless Settings.status == "database_offline"
31 # Use memcached for caching if required
32 config.cache_store = :mem_cache_store, Settings.memcache_servers, { :namespace => "rails:cache" } if Settings.key?(:memcache_servers)
34 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
35 # the I18n.default_locale when a translation cannot be found).
36 config.i18n.fallbacks = true
38 # Use logstash for logging if required
39 if Settings.key?(:logstash_path)
40 config.logstasher.enabled = true
41 config.logstasher.suppress_app_log = false
42 config.logstasher.logger_path = Settings.logstash_path
43 config.logstasher.log_controller_parameters = true