views:

42

answers:

1

I'm generating links from the home page (controller = 'landings') via a partial containing:

<%= link_to t.to_s, assets_path, :name => t.to_s %>

where assets/index is the controller/method that I'd like to pass the :name to. However, after I've clicked the link, and control is thrown to the assets/index controller, params.to_s = "actionindexcontrollerassets"

I'd appreciate any help.

+1  A: 

Extra parameters should be arguments to url/path helpers. This will do what you want:

<%= link_to t.to_s, assets_path( :name => t.to_s) %>
EmFi