Module: EacRailsBase0App::Application::Test::ClassMethods
- Defined in:
- lib/eac_rails_base0/app_base/application/test.rb
Instance Method Summary collapse
- #setup_action_controller ⇒ Object
- #setup_action_mailer ⇒ Object
- #setup_general ⇒ Object
- #setup_log ⇒ Object
- #setup_public_file_server ⇒ Object
Instance Method Details
#setup_action_controller ⇒ Object
21 22 23 24 |
# File 'lib/eac_rails_base0/app_base/application/test.rb', line 21 def setup_action_controller config.action_controller.perform_caching = false config.action_controller.allow_forgery_protection = false end |
#setup_action_mailer ⇒ Object
26 27 28 29 30 |
# File 'lib/eac_rails_base0/app_base/application/test.rb', line 26 def setup_action_mailer ACTION_MAILER_CONFIGS.each do |key, value| config.action_mailer.send("#{key}=", value) end end |
#setup_general ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/eac_rails_base0/app_base/application/test.rb', line 32 def setup_general config.cache_classes = true config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_dispatch.show_exceptions = false end |
#setup_log ⇒ Object
41 42 43 |
# File 'lib/eac_rails_base0/app_base/application/test.rb', line 41 def setup_log config.active_support.deprecation = :stderr end |
#setup_public_file_server ⇒ Object
45 46 47 48 49 50 |
# File 'lib/eac_rails_base0/app_base/application/test.rb', line 45 def setup_public_file_server config.public_file_server.enabled = true config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" } end |