Here is my routes line:
map.resources :sessions, :collection => { :activate
=> :any, :forgot_password => :any, :reset_password => :any }
Which creates the following routes:
/sessions;reset_password/ [:controller, :action]
{:controller=>"sessions", :action=>"reset_password"}
{}
/sessions.:format;reset_password/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"reset_password"}
{}
/sessions;forgot_password/ [:controller, :action]
{:controller=>"sessions", :action=>"forgot_password"}
{}
/sessions.:format;forgot_password/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"forgot_password"}
{}
/sessions/ [:controller, :action]
{:controller=>"sessions", :action=>"activate"} {}
/sessions.:format/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"activate"} {}
/sessions/ [:controller, :action]
{:controller=>"sessions", :action=>"index"}
{:method=>:get}
/sessions.:format/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"index"}
{:method=>:get}
/sessions/ [:controller, :action]
{:controller=>"sessions", :action=>"create"}
{:method=>:post}
/sessions.:format/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"create"}
{:method=>:post}
/sessions/ [:controller, :action]
{:controller=>"sessions", :action=>"index"}
{:method=>:get}
/sessions.:format/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"index"}
{:method=>:get}
/sessions/new/ [:controller, :action]
{:controller=>"sessions", :action=>"new"}
{:method=>:get}
/sessions/new.:format/ [:format, :controller, :action]
{:controller=>"sessions", :action=>"new"}
{:method=>:get}
/sessions/:id/ [:id, :controller, :action]
{:controller=>"sessions", :action=>"update"}
{:method=>:put}
/sessions/:id/ [:id, :controller, :action]
{:controller=>"sessions", :action=>"destroy"}
{:method=>:delete}
/sessions/:id;edit/ [:id, :controller, :action]
{:controller=>"sessions", :action=>"edit"}
{:method=>:get}
/sessions/:id.:format;edit/ [:id, :format, :controller, :action]
{:controller=>"sessions", :action=>"edit"}
{:method=>:get}
/sessions/:id/ [:id, :controller, :action]
{:controller=>"sessions", :action=>"show"}
{:method=>:get}
/sessions/:id.:format/ [:id, :format, :controller, :action]
{:controller=>"sessions", :action=>"show"}
{:method=>:get}
Sorry if that''s a little messy to follow. Here''s the important
part:
/sessions/ [:controller, :action]
{:controller=>"sessions", :action=>"activate"} {}
The route created _should_ look like this:
/sessions;activate/ [:controller, :action]
{:controller=>"sessions", :action=>"activate"} {}
This bug seems to be sporadic. For example, if I change :activate''s
method to :get, it creates the correct route for :activate, but then
the incorrect route for :forgot_password.
Anyone have any ideas?