You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application.rb 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # frozen_string_literal: true
  2. require File.expand_path('../boot', __FILE__)
  3. require 'rails/all'
  4. Bundler.require(*Rails.groups)
  5. module RedmineApp
  6. class Application < Rails::Application
  7. # Settings in config/environments/* take precedence over those specified here.
  8. # Application configuration should go into files in config/initializers
  9. # -- all .rb files in that directory are automatically loaded.
  10. # Custom directories with classes and modules you want to be autoloadable.
  11. config.autoload_paths += %W(#{config.root}/lib)
  12. # Only load the plugins named here, in the order given (default is alphabetical).
  13. # :all can be used as a placeholder for all plugins not explicitly named.
  14. # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  15. config.active_record.store_full_sti_class = true
  16. config.active_record.default_timezone = :local
  17. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  18. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
  19. # config.time_zone = 'Central Time (US & Canada)'
  20. # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  21. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  22. # config.i18n.default_locale = :de
  23. config.i18n.enforce_available_locales = true
  24. config.i18n.fallbacks = true
  25. config.i18n.default_locale = 'en'
  26. # Configure the default encoding used in templates for Ruby 1.9.
  27. config.encoding = "utf-8"
  28. # Configure sensitive parameters which will be filtered from the log file.
  29. config.filter_parameters += [:password]
  30. # Enable the asset pipeline
  31. config.assets.enabled = false
  32. # Version of your assets, change this if you want to expire all your assets
  33. config.assets.version = '1.0'
  34. config.action_mailer.perform_deliveries = false
  35. # Do not include all helpers
  36. config.action_controller.include_all_helpers = false
  37. # Since Redmine 4.0, boolean values are stored in sqlite3 databases as 1 and 0
  38. config.active_record.sqlite3.represent_boolean_as_integer = true
  39. # Sets the Content-Length header on responses with fixed-length bodies
  40. config.middleware.insert_after Rack::Sendfile, Rack::ContentLength
  41. # Verify validity of user sessions
  42. config.redmine_verify_sessions = true
  43. # Specific cache for search results, the default file store cache is not
  44. # a good option as it could grow fast. A memory store (32MB max) is used
  45. # as the default. If you're running multiple server processes, it's
  46. # recommended to switch to a shared cache store (eg. mem_cache_store).
  47. # See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
  48. # for more options (same options as config.cache_store).
  49. config.redmine_search_cache_store = :memory_store
  50. # Configure log level here so that additional environment file
  51. # can change it (environments/ENV.rb would take precedence over it)
  52. config.log_level = Rails.env.production? ? :info : :debug
  53. config.session_store :cookie_store,
  54. :key => '_redmine_session',
  55. :path => config.relative_url_root || '/'
  56. if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
  57. instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
  58. end
  59. end
  60. end