diff config/environments/development.rb @ 254:89f6c0016bab default tip

Update to latest rails
author nanaya <me@nanaya.net>
date Tue, 03 Sep 2024 19:21:25 +0900
parents 782fece93768
children
line wrap: on
line diff
--- a/config/environments/development.rb	Mon Mar 25 02:49:50 2024 +0900
+++ b/config/environments/development.rb	Tue Sep 03 19:21:25 2024 +0900
@@ -6,7 +6,7 @@
   # In the development environment your application's code is reloaded any time
   # it changes. This slows down response time but is perfect for development
   # since you don't have to restart the web server when you make code changes.
-  config.cache_classes = false
+  config.enable_reloading = true
 
   # Do not eager load code on boot.
   config.eager_load = false
@@ -14,24 +14,22 @@
   # Show full error reports.
   config.consider_all_requests_local = true
 
-  # Enable server timing
+  # Enable server timing.
   config.server_timing = true
 
   # Enable/disable caching. By default caching is disabled.
   # Run rails dev:cache to toggle caching.
-  #if Rails.root.join("tmp/caching-dev.txt").exist?
-  #  config.action_controller.perform_caching = true
-  #  config.action_controller.enable_fragment_cache_logging = true
+  if Rails.root.join("tmp/caching-dev.txt").exist?
+    config.action_controller.perform_caching = true
+    config.action_controller.enable_fragment_cache_logging = true
 
-  #  config.cache_store = :memory_store
-  #  config.public_file_server.headers = {
-  #    "Cache-Control" => "public, max-age=#{2.days.to_i}"
-  #  }
-  #else
-  #  config.action_controller.perform_caching = false
+    config.cache_store = :memory_store
+    config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
+  else
+    config.action_controller.perform_caching = false
 
-  #  config.cache_store = :null_store
-  #end
+    config.cache_store = :null_store
+  end
 
   # Print deprecation notices to the Rails logger.
   config.active_support.deprecation = :log
@@ -42,13 +40,12 @@
   # Tell Active Support which deprecation messages to disallow.
   config.active_support.disallowed_deprecation_warnings = []
 
-
   # Raises error for missing translations.
   # config.i18n.raise_on_missing_translations = true
 
   # Annotate rendered view with file names.
-  # config.action_view.annotate_rendered_view_with_filenames = true
+  config.action_view.annotate_rendered_view_with_filenames = true
 
-  # Uncomment if you wish to allow Action Cable access from any origin.
-  # config.action_cable.disable_request_forgery_protection = true
+  # Raise error when a before_action's only/except options reference missing actions.
+  config.action_controller.raise_on_missing_callback_actions = true
 end