Hi all, This is something I puzzle for quite a while. I need just one more controller method just like index, that doesn''t need another parameter when used with redirect_to (not like show). For that I define in config/routes: map.resources :orders, :member => { :confirm => :get } In my controller I can do then redirect_to confirm_order_path(some_id), but I actually want redirect_to confirm_order_path Is there an easy way to do this? Thanks in advance and Merry Xmas Jens -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What you''re after is :collection, not :member. http://frozenplague.net/2008/01/restful-routing-an-overview/ ----- Ryan Bigg Freelancer http://frozenplague.net On 24/12/2008, at 10:40 PM, Jens -- wrote:> > Hi all, > > This is something I puzzle for quite a while. I need just one more > controller method just like index, that doesn''t need another parameter > when used with redirect_to (not like show). For that I define in > config/routes: > > map.resources :orders, :member => { :confirm => :get } > > In my controller I can do then > > redirect_to confirm_order_path(some_id), but I actually want > > redirect_to confirm_order_path > > Is there an easy way to do this? > > Thanks in advance and Merry Xmas > Jens > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> What you''re after is :collection, not :member. > > http://frozenplague.net/2008/01/restful-routing-an-overview/ > > ----- > Ryan Bigg > Freelancer > http://frozenplague.netThanks a lot Ryan, that was exactly what I needed. Have a nice Xmas day Jens -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---