Skip to content

Ensure route collisions don't occur with admin/controller/batch_action and admin/controller/:id (#show)#49

Merged
andreibondarev merged 1 commit intoSourceLabsLLC:mainfrom
joshmfrankel:joshmfrankel/avoid-route-collisions
Apr 2, 2026
Merged

Ensure route collisions don't occur with admin/controller/batch_action and admin/controller/:id (#show)#49
andreibondarev merged 1 commit intoSourceLabsLLC:mainfrom
joshmfrankel:joshmfrankel/avoid-route-collisions

Conversation

@joshmfrankel
Copy link
Copy Markdown
Contributor

@joshmfrankel joshmfrankel commented Apr 2, 2026

Why

When #47 was merged it opened the possibility for admin/controller/action style url routes to conflict with existing admin/controller/:id #show endpoint. This PR uses the gem's name to prefix the route to avoid collisions.

For example

Admin::MyController#some_batch_action => admin/my_controller/some_batch_action
Admin::MyController#show => admin/my_controller/:id

In this case admin/my_controller/:id will likely be defined before the dynamically generated batch_action routes

What

  • Append administrate_batch_actions/ to routes

@joshmfrankel joshmfrankel marked this pull request as ready for review April 2, 2026 20:05
@andreibondarev andreibondarev merged commit 79f354e into SourceLabsLLC:main Apr 2, 2026
1 check passed
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