Skip to content

Commit f54b7a2

Browse files
committed
Update for Rails 7.2: config/environments/development.rb
1 parent a21174c commit f54b7a2

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

config/environments/development.rb

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Show full error reports.
1515
config.consider_all_requests_local = true
1616

17-
# Enable server timing
17+
# Enable server timing.
1818
config.server_timing = true
1919

2020
# Enable/disable caching. By default caching is disabled.
@@ -24,9 +24,7 @@
2424
config.action_controller.enable_fragment_cache_logging = true
2525

2626
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}" }
3028
else
3129
config.action_controller.perform_caching = false
3230

@@ -39,7 +37,11 @@
3937
# Don't care if the mailer can't send.
4038
config.action_mailer.raise_delivery_errors = false
4139

40+
# Disable caching for Action Mailer templates even if Action Controller
41+
# caching is enabled.
4242
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
4345

4446
# Print deprecation notices to the Rails logger.
4547
config.active_support.deprecation = :log
@@ -66,14 +68,17 @@
6668
# config.i18n.raise_on_missing_translations = true
6769

6870
# 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
7072

7173
# Uncomment if you wish to allow Action Cable access from any origin.
7274
# config.action_cable.disable_request_forgery_protection = true
75+
config.action_cable.allowed_request_origins = ["https://#{pf_host}"]
7376

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!
7782

7883
# Enable to edit on GitHub Codespaces && allow requests from our preview domain.
7984
pf_domain = ENV['GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN']
@@ -84,6 +89,4 @@
8489
pf_host = "#{ENV['CODESPACE_NAME']}-3000.#{pf_domain}"
8590
config.hosts << pf_host
8691
config.hosts << '.ngrok.io'
87-
88-
config.action_cable.allowed_request_origins = ["https://#{pf_host}"]
8992
end

0 commit comments

Comments
 (0)