|
14 | 14 | # Show full error reports.
|
15 | 15 | config.consider_all_requests_local = true
|
16 | 16 |
|
17 |
| - # Enable server timing |
| 17 | + # Enable server timing. |
18 | 18 | config.server_timing = true
|
19 | 19 |
|
20 | 20 | # Enable/disable caching. By default caching is disabled.
|
|
24 | 24 | config.action_controller.enable_fragment_cache_logging = true
|
25 | 25 |
|
26 | 26 | config.cache_store = :memory_store
|
27 |
| - config.public_file_server.headers = { |
28 |
| - "Cache-Control" => "public, max-age=#{2.days.to_i}" |
29 |
| - } |
| 27 | + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } |
30 | 28 | else
|
31 | 29 | config.action_controller.perform_caching = false
|
32 | 30 |
|
|
39 | 37 | # Don't care if the mailer can't send.
|
40 | 38 | config.action_mailer.raise_delivery_errors = false
|
41 | 39 |
|
| 40 | + # Disable caching for Action Mailer templates even if Action Controller |
| 41 | + # caching is enabled. |
42 | 42 | config.action_mailer.perform_caching = false
|
| 43 | + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } |
| 44 | + config.action_mailer.delivery_method = :letter_opener_web |
43 | 45 |
|
44 | 46 | # Print deprecation notices to the Rails logger.
|
45 | 47 | config.active_support.deprecation = :log
|
|
66 | 68 | # config.i18n.raise_on_missing_translations = true
|
67 | 69 |
|
68 | 70 | # Annotate rendered view with file names.
|
69 |
| - # config.action_view.annotate_rendered_view_with_filenames = true |
| 71 | + config.action_view.annotate_rendered_view_with_filenames = true |
70 | 72 |
|
71 | 73 | # Uncomment if you wish to allow Action Cable access from any origin.
|
72 | 74 | # config.action_cable.disable_request_forgery_protection = true
|
| 75 | + config.action_cable.allowed_request_origins = ["https://#{pf_host}"] |
73 | 76 |
|
74 |
| - # Add Mailer for notify signups |
75 |
| - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } |
76 |
| - config.action_mailer.delivery_method = :letter_opener_web |
| 77 | + # Raise error when a before_action's only/except options reference missing actions. |
| 78 | + config.action_controller.raise_on_missing_callback_actions = true |
| 79 | + |
| 80 | + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. |
| 81 | + # config.generators.apply_rubocop_autocorrect_after_generate! |
77 | 82 |
|
78 | 83 | # Enable to edit on GitHub Codespaces && allow requests from our preview domain.
|
79 | 84 | pf_domain = ENV['GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN']
|
|
84 | 89 | pf_host = "#{ENV['CODESPACE_NAME']}-3000.#{pf_domain}"
|
85 | 90 | config.hosts << pf_host
|
86 | 91 | config.hosts << '.ngrok.io'
|
87 |
| - |
88 |
| - config.action_cable.allowed_request_origins = ["https://#{pf_host}"] |
89 | 92 | end
|
0 commit comments