[Rails] Re: what does :new => {:start => :get} mean in routes?

2011-04-28 Thread John Merlino
> 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

[Rails] Re: what does :new => {:start => :get} mean in routes?

2011-04-27 Thread Max Reznichenko
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

[Rails] Re: what does :new => {:start => :get} mean in routes?

2011-04-26 Thread M Daubs
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

[Rails] Re: what does :new => {:start => :get} mean in routes?

2011-04-26 Thread John Merlino
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

[Rails] Re: what does :new => {:start => :get} mean in routes?

2011-04-26 Thread M Daubs
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