Passing paramters in Rest?

In the old way, you can always pass params like this, right?

<%= link_to "Whatever",:url => {:action => :new,param1 => :foobar} %>

How would you do this Restfully?


You can pass various parameters through the your restful routes.

<%= link to( "create a new resource", resource_path( :id => resource,
:extra_param => foo, :extra_param_2 => bar ) ) %>

Something along those lines should work fine.


That's actually the way I first thought of, but it didn't work it
seems. Scrolling down in the error page reveals all the parameters
passed, and the ones passed through the restful routes don't show up.

Oh, I found out the reason it was reporting errors. I forgot that it
was nested, so it needed 1 more parameter for the ID and then it
accepted other params. Thanks!