If I have code that looks like this:
:collection => {
:download_print_use => :get
}
rake routes dosn’t show me how to use :id to map to something like /controller/download_print_use/:id
what do I need to do to make this work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because that’s the point of the collection option. Ex:
events/download_print.I think you need to use
:member => {}to get what you want.It’s the same principle in rails 3, but with a more elegant syntax. You can read this paragraph to understand it better: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions