Mercurial > zeropaste
comparison config/environments/development.rb @ 459:07d6c6639adf
Upgrade to rails 5.2. RIP code style.
| author | nanaya <me@nanaya.pro> |
|---|---|
| date | Sat, 14 Apr 2018 04:19:52 +0900 |
| parents | d31fe32da7a0 |
| children | fd3078b4d355 |
comparison
equal
deleted
inserted
replaced
| 458:1c6a056269e6 | 459:07d6c6639adf |
|---|---|
| 7 config.cache_classes = false | 7 config.cache_classes = false |
| 8 | 8 |
| 9 # Do not eager load code on boot. | 9 # Do not eager load code on boot. |
| 10 config.eager_load = false | 10 config.eager_load = false |
| 11 | 11 |
| 12 # Show full error reports and disable caching. | 12 # Show full error reports. |
| 13 config.consider_all_requests_local = true | 13 config.consider_all_requests_local = true |
| 14 | |
| 14 # Enable/disable caching. By default caching is disabled. | 15 # Enable/disable caching. By default caching is disabled. |
| 15 if Rails.root.join("tmp/caching-dev.txt").exist? | 16 # Run rails dev:cache to toggle caching. |
| 16 config.action_controller.perform_caching = false | 17 if Rails.root.join('tmp', 'caching-dev.txt').exist? |
| 18 config.action_controller.perform_caching = true | |
| 17 | 19 |
| 18 config.cache_store = :memory_store | 20 config.cache_store = :memory_store |
| 19 config.public_file_server.headers = { | 21 config.public_file_server.headers = { |
| 20 "Cache-Control" => "public, max-age=172800" | 22 'Cache-Control' => "public, max-age=#{2.days.to_i}" |
| 21 } | 23 } |
| 22 else | 24 else |
| 23 config.action_controller.perform_caching = false | 25 config.action_controller.perform_caching = false |
| 24 | 26 |
| 25 config.cache_store = :null_store | 27 config.cache_store = :null_store |
| 26 end | 28 end |
| 27 | 29 |
| 28 # Don't care if the mailer can't send. | 30 # Store uploaded files on the local file system (see config/storage.yml for options) |
| 29 # config.action_mailer.raise_delivery_errors = false | 31 # config.active_storage.service = :local |
| 30 | 32 |
| 31 # Print deprecation notices to the Rails logger. | 33 # Print deprecation notices to the Rails logger. |
| 32 config.active_support.deprecation = :log | 34 config.active_support.deprecation = :log |
| 33 | 35 |
| 34 # Raise an error on page load if there are pending migrations. | 36 # Raise an error on page load if there are pending migrations. |
| 35 config.active_record.migration_error = :page_load | 37 config.active_record.migration_error = :page_load |
| 36 | 38 |
| 39 # Highlight code that triggered database queries in logs. | |
| 40 config.active_record.verbose_query_logs = true | |
| 41 | |
| 37 # Debug mode disables concatenation and preprocessing of assets. | 42 # Debug mode disables concatenation and preprocessing of assets. |
| 38 # This option may cause significant delays in view rendering with a large | 43 # This option may cause significant delays in view rendering with a large |
| 39 # number of complex assets. | 44 # number of complex assets. |
| 40 config.assets.debug = true | 45 config.assets.debug = true |
| 41 | 46 |
| 42 # Raises error for missing translations. | |
| 43 config.action_view.raise_on_missing_translations = true | |
| 44 | |
| 45 # Suppress logger output for asset requests. | 47 # Suppress logger output for asset requests. |
| 46 config.assets.quiet = true | 48 config.assets.quiet = true |
| 47 | 49 |
| 48 # Use an evented file watcher to asynchronously detect changes in source code | 50 # Raises error for missing translations |
| 51 # config.action_view.raise_on_missing_translations = true | |
| 52 | |
| 53 # Use an evented file watcher to asynchronously detect changes in source code, | |
| 49 # routes, locales, etc. This feature depends on the listen gem. | 54 # routes, locales, etc. This feature depends on the listen gem. |
| 50 # config.file_watcher = ActiveSupport::EventedFileUpdateChecker | 55 # config.file_watcher = ActiveSupport::EventedFileUpdateChecker |
| 51 end | 56 end |
