I have a simple question in RoR that I couldn’t find a simple solution
I have a http://www.example.com/items folder, and I want to rename it as http://www.example.com/admin for every url.
Is there a way to do it in routes.rb? I tried this
this is the way I’m naming it on routes.rb:
Portal::Application.routes.draw do
resources :items do
resources :requisitos
resources :videos
end
But it didn’t work.
Also, I can’t just rename the folder, as there are lots of files and links that depends on it.
you set the
:pathparameter:Keep in mind the order of precedence with routes. The line above will most-likely take precedence over the changed route of the second line for the path of
/admin