|
3 | 3 | Rails.application.configure do |
4 | 4 | # Settings specified here will take precedence over those in config/application.rb. |
5 | 5 |
|
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. |
9 | 7 | config.enable_reloading = true |
10 | 8 |
|
11 | 9 | # Do not eager load code on boot. |
|
14 | 12 | # Show full error reports. |
15 | 13 | config.consider_all_requests_local = true |
16 | 14 |
|
17 | | - # Enable server timing |
| 15 | + # Enable server timing. |
18 | 16 | config.server_timing = true |
19 | 17 |
|
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. |
22 | 20 | if Rails.root.join("tmp/caching-dev.txt").exist? |
23 | 21 | config.action_controller.perform_caching = true |
24 | 22 | config.action_controller.enable_fragment_cache_logging = true |
25 | | - |
26 | | - config.cache_store = :memory_store |
27 | | - config.public_file_server.headers = { |
28 | | - "Cache-Control" => "public, max-age=#{2.days.to_i}" |
29 | | - } |
| 23 | + config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } |
30 | 24 | else |
31 | 25 | config.action_controller.perform_caching = false |
32 | | - |
33 | | - config.cache_store = :null_store |
34 | 26 | end |
35 | 27 |
|
| 28 | + # Change to :null_store to avoid any caching. |
| 29 | + config.cache_store = :memory_store |
| 30 | + |
36 | 31 | # Store uploaded files on the local file system (see config/storage.yml for options) |
37 | 32 | config.active_storage.service = :local if config.respond_to?(:active_storage) |
38 | 33 |
|
39 | 34 | # Don't care if the mailer can't send. |
40 | 35 | config.action_mailer.raise_delivery_errors = false |
41 | 36 |
|
| 37 | + # Make template changes take effect immediately. |
42 | 38 | config.action_mailer.perform_caching = false |
43 | 39 |
|
| 40 | + # Set localhost to be used by links generated in mailer templates. |
| 41 | + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } |
| 42 | + |
44 | 43 | # Print deprecation notices to the Rails logger. |
45 | 44 | config.active_support.deprecation = :log |
46 | 45 |
|
47 | | - # Raise exceptions for disallowed deprecations. |
48 | | - config.active_support.disallowed_deprecation = :raise |
49 | | - |
50 | | - # Tell Active Support which deprecation messages to disallow. |
51 | | - config.active_support.disallowed_deprecation_warnings = [] |
52 | | - |
53 | 46 | # Raise an error on page load if there are pending migrations. |
54 | 47 | config.active_record.migration_error = :page_load |
55 | 48 |
|
56 | 49 | # Highlight code that triggered database queries in logs. |
57 | 50 | config.active_record.verbose_query_logs = true |
58 | 51 |
|
| 52 | + # Append comments with runtime information tags to SQL queries in logs. |
| 53 | + config.active_record.query_log_tags_enabled = true |
| 54 | + |
59 | 55 | # Highlight code that enqueued background job in logs. |
60 | 56 | config.active_job.verbose_enqueue_logs = true |
61 | 57 |
|
62 | | - # Suppress logger output for asset requests. |
63 | | - config.assets.quiet = true |
64 | | - |
65 | 58 | # Raises error for missing translations. |
66 | 59 | # config.i18n.raise_on_missing_translations = true |
67 | 60 |
|
68 | 61 | # Annotate rendered view with file names. |
69 | | - # config.action_view.annotate_rendered_view_with_filenames = true |
| 62 | + config.action_view.annotate_rendered_view_with_filenames = true |
70 | 63 |
|
71 | 64 | # Uncomment if you wish to allow Action Cable access from any origin. |
72 | 65 | # config.action_cable.disable_request_forgery_protection = true |
73 | 66 |
|
74 | | - # Raise error when a before_action's only/except options reference missing actions |
75 | | - # config.action_controller.raise_on_missing_callback_actions = true |
| 67 | + # Raise error when a before_action's only/except options reference missing actions. |
| 68 | + config.action_controller.raise_on_missing_callback_actions = true |
76 | 69 | end |
0 commit comments