I have a standard delete link, and want to add a parameter to it:
<%= link_to "Delete", item, :confirm => 'Are you sure?', :method => :delete, :foo => 1 %>
The parameter shows up in the html a tag, but does not make to the server. I get "undefined local variable or method `foo'".
Here is how I am accessing it in the controller:
def destroy
puts "params[:foo]:" + params[:foo].to_s
.
.
.
redirect_to edit_bar_path(params[:foo])
The output is params[:foo]: