I need to add some collection routes for a nested resource. I have a subscription controller and I need two new methods to add here. change_plan
and update_plan
Basically I need the urls looks like;
http://localhost:3007/admin/accounts/1/subscriptions/7/change_plan
http://localhost:3007/admin/accounts/1/subscriptions/7/update_plan
So where to add change_plan and update_plan? this is what I have so far.
map.namespace :admin do |admin|
admin.resources :payments
admin.resources :accounts, :collection=>{:profile=>:get}, :has_many => [:payments,:subscriptions]
end
Thanks for any help.