> Obviously
>>> map.resources :sessions, :member => {:validate => :get}, :new => {:start =>
> :get}, :only => %w(create new)
> creates new route for you like the one you have in new method
>>> redirect_to start_new_session_path and return if current_user
Thanks for response. I do notice this:
fo
Hi, John
Obviously
>> map.resources :sessions, :member => {:validate => :get}, :new => {:start =>
>> :get}, :only => %w(create new)
creates new route for you like the one you have in new method
>> redirect_to start_new_session_path and return if current_user
If you had
>> map.resources :sessions
Unless your routes file has a default :controller/:action route then
the start action would be unroutable without that entry. It could
even be redundant or unused.
The start method may return nil but the sessions/start view will still
render (if it exists).
On Apr 26, 6:40 pm, John Merlino wrot
M Daubs wrote in post #995201:
> I believe you only have two restful routes (create and new) because of
> the line:
>
> :only => %w(create new)
>
> And the start action is defined as an alternative new action here,
> probably because the original author wanted a GET instead of POST (/
> session
I believe you only have two restful routes (create and new) because of
the line:
:only => %w(create new)
And the start action is defined as an alternative new action here,
probably because the original author wanted a GET instead of POST (/
sessions/start):
:new => {:start => :get}
Base
5 matches
Mail list logo