Module: EacRailsBase0App::Application::Test::ClassMethods

Defined in:
lib/eac_rails_base0/app_base/application/test.rb

Instance Method Summary collapse

Instance Method Details

#setup_action_controllerObject



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_mailerObject



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_generalObject



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_logObject



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_serverObject



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