Forum: Ruby on Rails Restful routes question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B9638176195f247741cbbb85a2ab44c8?d=identicon&s=25 Jens -- (jc71229)
on 2008-12-24 13:10
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

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
9a2a53db8e9b4476038c94a64b32833f?d=identicon&s=25 Ryan Bigg (ryan-bigg)
on 2008-12-24 13:51
(Received via mailing list)
What you're after is :collection, not :member.

Ryan Bigg
B9638176195f247741cbbb85a2ab44c8?d=identicon&s=25 Jens -- (jc71229)
on 2008-12-24 15:03
Ryan Bigg wrote:
> What you're after is :collection, not :member.
> -----
> Ryan Bigg
> Freelancer

Thanks a lot Ryan, that was exactly what I needed.

Have a nice Xmas day
This topic is locked and can not be replied to.