Skip to content

Resolve Rails 8.1 deprecation warnings in the dummy application - #661

Merged
tricknotes merged 1 commit into
mainfrom
fix-rails-deprecations
Sep 4, 2026
Merged

Resolve Rails 8.1 deprecation warnings in the dummy application#661
tricknotes merged 1 commit into
mainfrom
fix-rails-deprecations

Conversation

@tricknotes

@tricknotes tricknotes commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

The Rails 8.1 CI jobs emit two kinds of deprecation warnings (e.g. this job):

  • config.active_support.to_time_preserves_timezone is deprecated and will be removed in Rails 8.2 — preserving the timezone is the only behavior on 8.1, so the dummy application now assigns the setting only on older Rails versions.
  • get received a hash argument as / get received a hash argument /pages/*id — this comes from HighVoltage's /pages/*id engine route, which is still defined with the deprecated hash-argument style (its latest release, 5.0.0, included). The gem's own mount_ember_app passes keywords and is not affected. The dummy application only uses HighVoltage's controller and templates, not the engine route, so it stops drawing it via HighVoltage.configure { |config| config.routes = false }.

Verification

  • Reproduced all three warnings under Rails 8.1 by initializing the dummy application and drawing its routes; after the change the same procedure emits none.
  • Repeated the procedure under Rails 7.2 (the Gemfile default) to confirm nothing regresses; spec/lib passes under 8.1.

@tricknotes
tricknotes force-pushed the fix-rails-deprecations branch from 059aeb2 to 838b557 Compare September 4, 2026 08:48
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 <noreply@anthropic.com>
@tricknotes
tricknotes force-pushed the fix-rails-deprecations branch from 838b557 to dd574bf Compare September 4, 2026 08:58
@tricknotes
tricknotes merged commit d0046a0 into main Sep 4, 2026
22 of 24 checks passed
@tricknotes
tricknotes deleted the fix-rails-deprecations branch September 4, 2026 09:24
@tricknotes tricknotes mentioned this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants