Link_to that sends multi-level params

How can I use a link_to that will send multi-level params? I need to be
able to use the following in the controller:

params[:sales_order][:id]

Here’s the link_to I currently have:

link_to sales_order.id.to_s, :action => ‘show’, :id => sales_order.id

But that just gives me this in the controller:

params[:id]

Is it possible to do what I’m wanting?

Thanks!

Allright, I think I figured out how to do this. Maybe it can help
someone else:

link_to sales_order.id.to_s, :action => ‘show’, :sales_order => {:id
=> sales_order.id}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs