I got a resource called posts, now i want to map root to posts as a resource. so as the result:
'/posts' => nothing
'/posts/1' => nothing
but
'/' => posts#index
'/1' => posts#show
In config/routes.rb
change
resources :posts
to:
resources :posts, :path => '/'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With