Skip to content

Fix Rails 7.x deprecations and breaking changes#57

Merged
fusion94 merged 1 commit intomasterfrom
fix/53-rails7-deprecations
Mar 15, 2026
Merged

Fix Rails 7.x deprecations and breaking changes#57
fusion94 merged 1 commit intomasterfrom
fix/53-rails7-deprecations

Conversation

@fusion94
Copy link
Collaborator

Summary

Address deprecated APIs and breaking changes for Rails 7.0/7.1 and paper_trail 12+/15+ compatibility.

Changes

  • link_to method: :putbutton_to method: :put — Rails 7 with Turbo doesn't support link_to with HTTP methods. button_to generates a proper form.
  • data: { confirm: ... }data: { turbo_confirm: ... } — Rails 7/Turbo uses data-turbo-confirm instead of data-confirm.
  • ActiveRecord::Base.subclasses.descendants — In Rails 7.1, subclasses returns only direct subclasses, missing STI models. descendants traverses the full hierarchy.
  • Hash rocket → keyword syntax — Modernized all view hash syntax (:partial =>partial:, etc.).

Test Plan

  • Rollback button renders as a form with PUT method
  • Turbo confirmation dialog works on rollback
  • All versioned model types appear in the type filter dropdown
  • Views render without deprecation warnings under Rails 7.1

Closes #53

- Replace link_to method: :put with button_to (Rails 7/Turbo compatible)
- Add data-turbo-confirm for rollback confirmation dialogs
- Replace ActiveRecord::Base.subclasses with .descendants (Rails 7.1)
- Convert hash rocket syntax to modern Ruby hash syntax in views
- Use keyword args for render partial calls

Refs #53
@fusion94 fusion94 merged commit 147068f into master Mar 15, 2026
0 of 24 checks passed
@fusion94 fusion94 deleted the fix/53-rails7-deprecations branch March 15, 2026 04:22
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.

Fix deprecation warnings and breaking changes for Rails 7.x

1 participant