Hi everybody, I am working on my first rest RoR app, and in short:
i have resource e.g (users)
instead of calling it using www.example.com/users/id my aim is to call
id is pointing in my case to users.name field in database.
My question is what is the Rails Way of doing it? I tried on few
ways but as it is more “do to learn” project I wish to do it right.
My guess is to do in routing file:
Should I “hack” it using map.connect? or maybe from inside resource
Should I gave up with :resource shortcut and do it manually using named
The 2nd part of my question is (just to make it harder a bit) i wish to
something like www.example.com/welcome redirection when typed *
www.example.com (welcome as a action of users). *I know to use
for :users resources… but how to make it work with map.root :users ?
I am quite sure that how to of similar thing is somewhere to be found
on-line, but I didn’t find it… hope to get at least tip:)