Skip to content

Commit aa1a111

Browse files
committed
Update to Rails 8.0: config/environments/development.rb
1 parent b61178a commit aa1a111

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

config/environments/development.rb

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
Rails.application.configure do
44
# Settings specified here will take precedence over those in config/application.rb.
55

6-
# In the development environment your application's code is reloaded any time
7-
# it changes. This slows down response time but is perfect for development
8-
# since you don't have to restart the web server when you make code changes.
6+
# Make code changes take effect immediately without server restart.
97
config.enable_reloading = true
108

119
# Do not eager load code on boot.
@@ -17,53 +15,47 @@
1715
# Enable server timing.
1816
config.server_timing = true
1917

20-
# Enable/disable caching. By default caching is disabled.
21-
# Run rails dev:cache to toggle caching.
18+
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19+
# Run rails dev:cache to toggle Action Controller caching.
2220
if Rails.root.join("tmp/caching-dev.txt").exist?
2321
config.action_controller.perform_caching = true
2422
config.action_controller.enable_fragment_cache_logging = true
25-
26-
config.cache_store = :memory_store
27-
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
23+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2824
else
2925
config.action_controller.perform_caching = false
30-
31-
config.cache_store = :null_store
3226
end
3327

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3431
# Store uploaded files on the local file system (see config/storage.yml for options).
3532
config.active_storage.service = :local
3633

3734
# Don't care if the mailer can't send.
3835
config.action_mailer.raise_delivery_errors = false
3936

40-
# Disable caching for Action Mailer templates even if Action Controller
41-
# caching is enabled.
37+
# Make template changes take effect immediately.
4238
config.action_mailer.perform_caching = false
39+
40+
# Set localhost to be used by links generated in mailer templates.
4341
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
4442
config.action_mailer.delivery_method = :letter_opener_web
4543

4644
# Print deprecation notices to the Rails logger.
4745
config.active_support.deprecation = :log
4846

49-
# Raise exceptions for disallowed deprecations.
50-
config.active_support.disallowed_deprecation = :raise
51-
52-
# Tell Active Support which deprecation messages to disallow.
53-
config.active_support.disallowed_deprecation_warnings = []
54-
5547
# Raise an error on page load if there are pending migrations.
5648
config.active_record.migration_error = :page_load
5749

5850
# Highlight code that triggered database queries in logs.
5951
config.active_record.verbose_query_logs = true
6052

53+
# Append comments with runtime information tags to SQL queries in logs.
54+
config.active_record.query_log_tags_enabled = true
55+
6156
# Highlight code that enqueued background job in logs.
6257
config.active_job.verbose_enqueue_logs = true
6358

64-
# Suppress logger output for asset requests.
65-
config.assets.quiet = true
66-
6759
# Raises error for missing translations.
6860
# config.i18n.raise_on_missing_translations = true
6961

0 commit comments

Comments
 (0)