comparison config/environments/development.rb @ 255:eda83610b65c

Update rails and stuff
author nanaya <me@nanaya.net>
date Sun, 15 Dec 2024 22:45:33 +0900
parents 89f6c0016bab
children
comparison
equal deleted inserted replaced
254:89f6c0016bab 255:eda83610b65c
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
8 # since you don't have to restart the web server when you make code changes.
9 config.enable_reloading = true 7 config.enable_reloading = true
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
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 = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
28 else 24 else
29 config.action_controller.perform_caching = false 25 config.action_controller.perform_caching = false
26 end
30 27
31 config.cache_store = :null_store 28 # Change to :null_store to avoid any caching.
32 end 29 config.cache_store = :memory_store
33 30
34 # Print deprecation notices to the Rails logger. 31 # Print deprecation notices to the Rails logger.
35 config.active_support.deprecation = :log 32 config.active_support.deprecation = :log
36
37 # Raise exceptions for disallowed deprecations.
38 config.active_support.disallowed_deprecation = :raise
39
40 # Tell Active Support which deprecation messages to disallow.
41 config.active_support.disallowed_deprecation_warnings = []
42 33
43 # Raises error for missing translations. 34 # Raises error for missing translations.
44 # config.i18n.raise_on_missing_translations = true 35 # config.i18n.raise_on_missing_translations = true
45 36
46 # Annotate rendered view with file names. 37 # Annotate rendered view with file names.