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

Root route should be configurable #1656

Open
jagthedrummer opened this issue Aug 19, 2024 · 0 comments
Open

Root route should be configurable #1656

jagthedrummer opened this issue Aug 19, 2024 · 0 comments

Comments

@jagthedrummer
Copy link
Contributor

Currently we've hard coded the root routes, but it would be nice to be able to configure them somehow.

https://github.com/bullet-train-co/bullet_train-core/blob/346d5b1adfaaec4046eece13a73b812e3645ada0/bullet_train/config/routes.rb#L7

https://github.com/bullet-train-co/bullet_train-core/blob/346d5b1adfaaec4046eece13a73b812e3645ada0/bullet_train/config/routes.rb#L19

I tried doing this:

root to: "my_new_root_controller#index"

But it throws an error when it reaches the root route from the bullet_train gem.

Invalid route name, already in use: 'root'
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
https://guides.rubyonrails.org/routing.html#restricting-the-routes-created

CleanShot 2024-08-19 at 11 39 15

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

No branches or pull requests

1 participant