|
23 | 23 |
|
24 | 24 | # Configure public file server for tests with Cache-Control for performance. |
25 | 25 | config.public_file_server.enabled = true |
26 | | - config.public_file_server.headers = { |
27 | | - "Cache-Control" => "public, max-age=#{1.hour.to_i}" |
28 | | - } |
| 26 | + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } |
29 | 27 |
|
30 | 28 | # Show full error reports and disable caching. |
31 | 29 | config.consider_all_requests_local = true |
|
38 | 36 | # Disable request forgery protection in test environment. |
39 | 37 | config.action_controller.allow_forgery_protection = false |
40 | 38 |
|
| 39 | + # Disable caching for Action Mailer templates even if Action Controller |
| 40 | + # caching is enabled. |
41 | 41 | config.action_mailer.perform_caching = false |
42 | 42 |
|
43 | 43 | # Tell Action Mailer not to deliver emails to the real world. |
44 | 44 | # The :test delivery method accumulates sent emails in the |
45 | 45 | # ActionMailer::Base.deliveries array. |
46 | 46 | config.action_mailer.delivery_method = :test |
47 | 47 |
|
| 48 | + # Unlike controllers, the mailer instance doesn't have any context about the |
| 49 | + # incoming request so you'll need to provide the :host parameter yourself. |
| 50 | + config.action_mailer.default_url_options = { host: "www.example.com" } |
| 51 | + |
48 | 52 | # Print deprecation notices to the stderr. |
49 | 53 | config.active_support.deprecation = :stderr |
50 | 54 |
|
|
60 | 64 | # Annotate rendered view with file names. |
61 | 65 | # config.action_view.annotate_rendered_view_with_filenames = true |
62 | 66 |
|
63 | | - # Raise error when a before_action's only/except options reference missing actions |
| 67 | + # Raise error when a before_action's only/except options reference missing actions. |
64 | 68 | config.action_controller.raise_on_missing_callback_actions = true |
65 | 69 | end |
0 commit comments