Mercurial > zeropaste
annotate config/environments/development.rb @ 481:88fd5722fcb3
Update defaults
author | nanaya <me@nanaya.pro> |
---|---|
date | Sun, 28 Nov 2021 19:45:05 +0900 |
parents | fd3078b4d355 |
children | 6cac8fcf8164 |
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 |
481 | 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 | |
0 | 8 # since you don't have to restart the web server when you make code changes. |
9 config.cache_classes = false | |
10 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
11 # 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
|
12 config.eager_load = false |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
13 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
14 # Show full error reports. |
431 | 15 config.consider_all_requests_local = true |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
16 |
431 | 17 # Enable/disable caching. By default caching is disabled. |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
18 # Run rails dev:cache to toggle caching. |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
19 if Rails.root.join('tmp', 'caching-dev.txt').exist? |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
20 config.action_controller.perform_caching = true |
467 | 21 config.action_controller.enable_fragment_cache_logging = true |
431 | 22 |
23 config.cache_store = :memory_store | |
24 config.public_file_server.headers = { | |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
25 'Cache-Control' => "public, max-age=#{2.days.to_i}" |
431 | 26 } |
27 else | |
28 config.action_controller.perform_caching = false | |
29 | |
30 config.cache_store = :null_store | |
31 end | |
0 | 32 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
33 # Print deprecation notices to the Rails logger. |
0 | 34 config.active_support.deprecation = :log |
35 | |
481 | 36 # Raise exceptions for disallowed deprecations. |
37 config.active_support.disallowed_deprecation = :raise | |
38 | |
39 # Tell Active Support which deprecation messages to disallow. | |
40 config.active_support.disallowed_deprecation_warnings = [] | |
41 | |
431 | 42 # 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
|
43 config.active_record.migration_error = :page_load |
0 | 44 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
45 # 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
|
46 config.active_record.verbose_query_logs = true |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
47 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
48 # Debug mode disables concatenation and preprocessing of assets. |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
49 # This option may cause significant delays in view rendering with a large |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
50 # number of complex assets. |
0 | 51 config.assets.debug = true |
431 | 52 |
437 | 53 # Suppress logger output for asset requests. |
54 config.assets.quiet = true | |
55 | |
467 | 56 # Raises error for missing translations. |
481 | 57 # config.i18n.raise_on_missing_translations = true |
58 | |
59 # Annotate rendered view with file names. | |
60 # 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
|
61 |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
62 # Use an evented file watcher to asynchronously detect changes in source code, |
431 | 63 # routes, locales, etc. This feature depends on the listen gem. |
64 # config.file_watcher = ActiveSupport::EventedFileUpdateChecker | |
481 | 65 |
66 # Uncomment if you wish to allow Action Cable access from any origin. | |
67 # config.action_cable.disable_request_forgery_protection = true | |
0 | 68 end |