AndrewP
AndrewP

Reputation: 1087

How can I route the root of a Rails app to a specific controller?

Right now I have a path that is 'localhost:3000/boards'. So for example 'boards/new', 'boards/1', etc. How can I route that all to root. So I could just do 'localhost:3000/new', 'localhost:3000/1' and it would route to 'boards'?

Thanks!

Upvotes: 0

Views: 38

Answers (1)

yoones
yoones

Reputation: 2474

Try resources :board, path: "/" in config/routes.rb

Upvotes: 1

Related Questions