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

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