Mercurial > zeropaste
annotate config/environments/development.rb @ 464:f11862e58af4
Canonicalize 0-prefixed ids as well
author | nanaya <me@nanaya.pro> |
---|---|
date | Mon, 10 Dec 2018 02:38:45 +0900 |
parents | 07d6c6639adf |
children | fd3078b4d355 |
rev | line source |
---|---|
431 | 1 Rails.application.configure do |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
2 # Settings specified here will take precedence over those in config/application.rb. |
0 | 3 |
4 # In the development environment your application's code is reloaded on | |
5 # every request. This slows down response time but is perfect for development | |
6 # since you don't have to restart the web server when you make code changes. | |
7 config.cache_classes = false | |
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 |
431 | 15 # 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
|
16 # Run rails dev:cache to toggle caching. |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
17 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
|
18 config.action_controller.perform_caching = true |
431 | 19 |
20 config.cache_store = :memory_store | |
21 config.public_file_server.headers = { | |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
22 'Cache-Control' => "public, max-age=#{2.days.to_i}" |
431 | 23 } |
24 else | |
25 config.action_controller.perform_caching = false | |
26 | |
27 config.cache_store = :null_store | |
28 end | |
0 | 29 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
30 # Store uploaded files on the local file system (see config/storage.yml for options) |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
31 # config.active_storage.service = :local |
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 | |
431 | 36 # 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
|
37 config.active_record.migration_error = :page_load |
0 | 38 |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
39 # 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
|
40 config.active_record.verbose_query_logs = true |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
41 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
42 # 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
|
43 # 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
|
44 # number of complex assets. |
0 | 45 config.assets.debug = true |
431 | 46 |
437 | 47 # Suppress logger output for asset requests. |
48 config.assets.quiet = true | |
49 | |
459
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
50 # Raises error for missing translations |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
51 # config.action_view.raise_on_missing_translations = true |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
52 |
07d6c6639adf
Upgrade to rails 5.2. RIP code style.
nanaya <me@nanaya.pro>
parents:
437
diff
changeset
|
53 # Use an evented file watcher to asynchronously detect changes in source code, |
431 | 54 # routes, locales, etc. This feature depends on the listen gem. |
55 # config.file_watcher = ActiveSupport::EventedFileUpdateChecker | |
0 | 56 end |