Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

Two or more parameters in RESTful route

Regardless of whether this is RESTful, to add multiple parameters to a normally RESTful route use the following

myresource_path(:id => myId, :extra_param => extraId, :extra_param2 => blah)


Results in
myresource/myId?extra_param=extraId&extra_param2=blah


See this Google Rails Group thread from Jeremy Kemper.
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed