I set up quiet authentication and user management without any gems in Rails 3.
However, it seems to me stupid to switch to "/ session / new" instead of "/ sign_in".
I know that you can use the whole resource, so instead of "/ sessions" and friends, my users can use "/ squirrels" and friends, but not what I'm trying to accomplish here. I want to use one specific action.
I know this can be done with
resources :sessions, :path_names => { :new => "sign_in" }
but then the route ends as "/ sessions / sign_in" - and I don’t want the controller name at all for this action. I would like to point this out with
resources :sessions, :path_names => { :new => "/sign_in" }
where "/" tells the rails that this is the full path name. But this has the same effect as the first piece of code.
My last attempt was only to use surface
match "sign_in" => "sessions#new"
which allows someone to manually enter "/ sign_in" in their URL string, but the links made with new_session_(path|url)are still users of the earth in the more awkward "/ session / sign_in".
source
share