Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix resourceful routing paths to be acceptable to stricter Rails8 #2802

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

jrochkind
Copy link
Contributor

@jrochkind jrochkind commented Dec 5, 2024

When in routing you say resource :something, only: [things], the things should be routes that would have been created by the resource method/dsl by default.

If you mention something that wasn't a default route -- in Rails prior to 8, it would just be an ignored no-op. But in Rails 8 it raises, perhaps to keep you from thinking you were doing something that was just a no-op.

In prep for Rails 8 upgrade, we remove a couple times we did this -- one that was actually generated by Blacklight generator a ways back, and now results in only: [] (no default routes automatic, only ones our routing concern will add itself!), and one local. The things we removed werent' having any effect anyway, and in Rails 8 would raise.

@jrochkind jrochkind marked this pull request as draft December 5, 2024 17:53
@jrochkind jrochkind force-pushed the strict_resourceful_routing branch 2 times, most recently from 55dc106 to d9d3755 Compare December 5, 2024 20:40
@jrochkind jrochkind marked this pull request as ready for review December 9, 2024 14:21
can no longer mention paths that didn't apply anyway, it raises now.
@jrochkind jrochkind force-pushed the strict_resourceful_routing branch from d9d3755 to 5fe3aa5 Compare December 12, 2024 14:55
@jrochkind jrochkind merged commit bf6357f into master Dec 12, 2024
1 check passed
@jrochkind jrochkind deleted the strict_resourceful_routing branch December 12, 2024 15:12
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