|
18 | 18 | config.eager_load = ENV["CI"].present?
|
19 | 19 |
|
20 | 20 | # Configure public file server for tests with Cache-Control for performance.
|
21 |
| - config.public_file_server.enabled = true |
22 |
| - config.public_file_server.headers = { |
23 |
| - "Cache-Control" => "public, max-age=#{1.hour.to_i}" |
24 |
| - } |
| 21 | + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } |
25 | 22 |
|
26 | 23 | # Show full error reports and disable caching.
|
27 | 24 | config.consider_all_requests_local = true
|
28 | 25 | config.action_controller.perform_caching = false
|
29 | 26 | config.cache_store = :null_store
|
30 | 27 |
|
31 | 28 | # Render exception templates for rescuable exceptions and raise for other exceptions.
|
32 |
| - config.action_dispatch.show_exceptions = :none |
| 29 | + config.action_dispatch.show_exceptions = :rescuable |
33 | 30 |
|
34 | 31 | # Disable request forgery protection in test environment.
|
35 | 32 | config.action_controller.allow_forgery_protection = false
|
36 | 33 |
|
37 | 34 | # Store uploaded files on the local file system in a temporary directory.
|
38 | 35 | config.active_storage.service = :test
|
39 | 36 |
|
| 37 | + # Disable caching for Action Mailer templates even if Action Controller |
| 38 | + # caching is enabled. |
40 | 39 | config.action_mailer.perform_caching = false
|
41 | 40 |
|
42 | 41 | # Tell Action Mailer not to deliver emails to the real world.
|
43 | 42 | # The :test delivery method accumulates sent emails in the
|
44 | 43 | # ActionMailer::Base.deliveries array.
|
45 | 44 | config.action_mailer.delivery_method = :test
|
46 | 45 |
|
| 46 | + # Unlike controllers, the mailer instance doesn't have any context about the |
| 47 | + # incoming request so you'll need to provide the :host parameter yourself. |
| 48 | + config.action_mailer.default_url_options = { host: "coderdojo.jp" } |
| 49 | + |
47 | 50 | # Print deprecation notices to the stderr.
|
48 | 51 | config.active_support.deprecation = :stderr
|
49 | 52 |
|
|
59 | 62 | # Annotate rendered view with file names.
|
60 | 63 | # config.action_view.annotate_rendered_view_with_filenames = true
|
61 | 64 |
|
62 |
| - # Raise error when a before_action's only/except options reference missing actions |
| 65 | + # Raise error when a before_action's only/except options reference missing actions. |
63 | 66 | config.action_controller.raise_on_missing_callback_actions = true
|
64 | 67 | end
|
0 commit comments