Mercurial > zeropaste
comparison 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 |
comparison
equal
deleted
inserted
replaced
494:e508d3226214 | 495:92929378413e |
---|---|
1 require "active_support/core_ext/integer/time" | 1 require "active_support/core_ext/integer/time" |
2 | 2 |
3 Rails.application.configure do | 3 Rails.application.configure do |
4 # Settings specified here will take precedence over those in config/application.rb. | 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 | 6 # Make code changes take effect immediately without server restart. |
7 # it changes. This slows down response time but is perfect for development | 7 config.enable_reloading = true |
8 # since you don't have to restart the web server when you make code changes. | |
9 config.cache_classes = false | |
10 | 8 |
11 # Do not eager load code on boot. | 9 # Do not eager load code on boot. |
12 config.eager_load = false | 10 config.eager_load = false |
13 | 11 |
14 # Show full error reports. | 12 # Show full error reports. |
15 config.consider_all_requests_local = true | 13 config.consider_all_requests_local = true |
16 | 14 |
17 # Enable server timing | 15 # Enable server timing. |
18 config.server_timing = true | 16 config.server_timing = true |
19 | 17 |
20 # Enable/disable caching. By default caching is disabled. | 18 # Enable/disable Action Controller caching. By default Action Controller caching is disabled. |
21 # Run rails dev:cache to toggle caching. | 19 # Run rails dev:cache to toggle Action Controller caching. |
22 if Rails.root.join("tmp/caching-dev.txt").exist? | 20 if Rails.root.join("tmp/caching-dev.txt").exist? |
23 config.action_controller.perform_caching = true | 21 config.action_controller.perform_caching = true |
24 config.action_controller.enable_fragment_cache_logging = true | 22 config.action_controller.enable_fragment_cache_logging = true |
25 | 23 config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" } |
26 config.cache_store = :memory_store | |
27 config.public_file_server.headers = { | |
28 "Cache-Control" => "public, max-age=#{2.days.to_i}" | |
29 } | |
30 else | 24 else |
31 config.action_controller.perform_caching = false | 25 config.action_controller.perform_caching = false |
26 end | |
32 | 27 |
33 config.cache_store = :null_store | 28 # Change to :null_store to avoid any caching. |
34 end | 29 config.cache_store = :memory_store |
35 | 30 |
36 # Print deprecation notices to the Rails logger. | 31 # Print deprecation notices to the Rails logger. |
37 config.active_support.deprecation = :log | 32 config.active_support.deprecation = :log |
38 | |
39 # Raise exceptions for disallowed deprecations. | |
40 config.active_support.disallowed_deprecation = :raise | |
41 | |
42 # Tell Active Support which deprecation messages to disallow. | |
43 config.active_support.disallowed_deprecation_warnings = [] | |
44 | 33 |
45 # Raise an error on page load if there are pending migrations. | 34 # Raise an error on page load if there are pending migrations. |
46 config.active_record.migration_error = :page_load | 35 config.active_record.migration_error = :page_load |
47 | 36 |
48 # Highlight code that triggered database queries in logs. | 37 # Highlight code that triggered database queries in logs. |
49 config.active_record.verbose_query_logs = true | 38 config.active_record.verbose_query_logs = true |
50 | 39 |
51 # Suppress logger output for asset requests. | 40 # Append comments with runtime information tags to SQL queries in logs. |
52 config.assets.quiet = true | 41 config.active_record.query_log_tags_enabled = true |
53 | 42 |
54 # Raises error for missing translations. | 43 # Raises error for missing translations. |
55 # config.i18n.raise_on_missing_translations = true | 44 # config.i18n.raise_on_missing_translations = true |
56 | 45 |
57 # Annotate rendered view with file names. | 46 # Annotate rendered view with file names. |
58 # config.action_view.annotate_rendered_view_with_filenames = true | 47 config.action_view.annotate_rendered_view_with_filenames = true |
59 | 48 |
60 # Uncomment if you wish to allow Action Cable access from any origin. | 49 # Raise error when a before_action's only/except options reference missing actions. |
61 # config.action_cable.disable_request_forgery_protection = true | 50 config.action_controller.raise_on_missing_callback_actions = true |
62 end | 51 end |