Mercurial > zeropaste
annotate config/environments/development.rb @ 495:92929378413e
Update to latest rails
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 15 Dec 2024 22:18:06 +0900 |
parents | 6cac8fcf8164 |
children |
rev | line source |
---|---|
481 | 1 require "active_support/core_ext/integer/time" |
2 | |
431 | 3 Rails.application.configure do |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
4 # Settings specified here will take precedence over those in config/application.rb. |
0 | 5 |
495 | 6 # Make code changes take effect immediately without server restart. |
7 config.enable_reloading = true | |
0 | 8 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
9 # Do not eager load code on boot. |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
10 config.eager_load = false |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
11 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
12 # Show full error reports. |
431 | 13 config.consider_all_requests_local = true |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
14 |
495 | 15 # Enable server timing. |
485 | 16 config.server_timing = true |
17 | |
495 | 18 # Enable/disable Action Controller caching. By default Action Controller caching is disabled. |
19 # Run rails dev:cache to toggle Action Controller caching. | |
485 | 20 if Rails.root.join("tmp/caching-dev.txt").exist? |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
21 config.action_controller.perform_caching = true |
467 | 22 config.action_controller.enable_fragment_cache_logging = true |
495 | 23 config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } |
431 | 24 else |
25 config.action_controller.perform_caching = false | |
495 | 26 end |
431 | 27 |
495 | 28 # Change to :null_store to avoid any caching. |
29 config.cache_store = :memory_store | |
0 | 30 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
31 # Print deprecation notices to the Rails logger. |
0 | 32 config.active_support.deprecation = :log |
33 | |
431 | 34 # Raise an error on page load if there are pending migrations. |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
35 config.active_record.migration_error = :page_load |
0 | 36 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
37 # Highlight code that triggered database queries in logs. |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
38 config.active_record.verbose_query_logs = true |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
39 |
495 | 40 # Append comments with runtime information tags to SQL queries in logs. |
41 config.active_record.query_log_tags_enabled = true | |
437 | 42 |
467 | 43 # Raises error for missing translations. |
481 | 44 # config.i18n.raise_on_missing_translations = true |
45 | |
46 # Annotate rendered view with file names. | |
495 | 47 config.action_view.annotate_rendered_view_with_filenames = true |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
48 |
495 | 49 # Raise error when a before_action's only/except options reference missing actions. |
50 config.action_controller.raise_on_missing_callback_actions = true | |
0 | 51 end |