From dd574bf58b7291386c1550e0697f0ad1be4dade2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 08:35:37 +0000 Subject: [PATCH] Resolve Rails 8.1 deprecation warnings in the dummy application Rails 8.1 deprecates assigning `config.active_support.to_time_preserves_timezone`, since preserving the timezone is now the only behavior: keep the assignment only for older Rails versions. It also deprecates hash arguments to route helpers, which HighVoltage's `/pages/*id` engine route still uses. The dummy application only uses HighVoltage's controller and templates, so stop drawing the unused engine route instead. Co-Authored-By: Claude Fable 5 --- spec/dummy/application.rb | 4 +++- spec/dummy/config/initializers/high_voltage.rb | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/dummy/application.rb b/spec/dummy/application.rb index fd14a1e3..b2e64db7 100644 --- a/spec/dummy/application.rb +++ b/spec/dummy/application.rb @@ -33,7 +33,9 @@ class Application < Rails::Application config.secret_token = "SECRET_TOKEN_IS_MIN_30_CHARS_LONG" config.secret_key_base = "SECRET_KEY_BASE" - config.active_support.to_time_preserves_timezone = :zone + if Rails.gem_version < Gem::Version.new("8.1") + config.active_support.to_time_preserves_timezone = :zone + end def require_environment! initialize! diff --git a/spec/dummy/config/initializers/high_voltage.rb b/spec/dummy/config/initializers/high_voltage.rb index 5c1fc242..97bb9df1 100644 --- a/spec/dummy/config/initializers/high_voltage.rb +++ b/spec/dummy/config/initializers/high_voltage.rb @@ -2,4 +2,5 @@ HighVoltage.configure do |config| config.layout = false + config.routes = false end