]> git.openstreetmap.org Git - rails.git/blob - config/application.rb
Merge remote-tracking branch 'upstream/pull/4426'
[rails.git] / config / application.rb
1 require_relative "boot"
2
3 require "rails/all"
4
5 # Require the gems listed in Gemfile, including any gems
6 # you've limited to :test, :development, or :production.
7 Bundler.require(*Rails.groups)
8
9 module OpenStreetMap
10   class Application < Rails::Application
11     # Initialize configuration defaults for originally generated Rails version.
12     config.load_defaults 7.1
13
14     # Please, add to the `ignore` list any other `lib` subdirectories that do
15     # not contain `.rb` files, or that should not be reloaded or eager loaded.
16     # Common ones are `templates`, `generators`, or `middleware`, for example.
17     config.autoload_lib(:ignore => %w[assets classic_pagination tasks])
18
19     # Configuration for the application, engines, and railties goes here.
20     #
21     # These settings can be overridden in specific environments using the files
22     # in config/environments, which are processed later.
23     #
24     # config.time_zone = "Central Time (US & Canada)"
25     # config.eager_load_paths << Rails.root.join("extras")
26
27     # Use SQL instead of Active Record's schema dumper when creating the database.
28     # This is necessary if your schema can't be completely dumped by the schema dumper,
29     # like if you have constraints or database-specific column types
30     config.active_record.schema_format = :sql unless Settings.status == "database_offline"
31
32     # Use memcached for caching if required
33     config.cache_store = :mem_cache_store, Settings.memcache_servers, { :namespace => "rails:cache" } if Settings.key?(:memcache_servers)
34
35     # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
36     # the I18n.default_locale when a translation cannot be found).
37     config.i18n.fallbacks = true
38     # Enables custom error message formats
39     config.active_model.i18n_customize_full_message = true
40
41     # Use logstash for logging if required
42     if Settings.key?(:logstash_path)
43       config.logstasher.enabled = true
44       config.logstasher.suppress_app_log = false
45       config.logstasher.logger_path = Settings.logstash_path
46       config.logstasher.log_controller_parameters = true
47     end
48   end
49 end