bullet-train-co/bullet_train

Root route should be configurable

Opened this issue · 0 comments

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