0

I'm just trying to setup excel downloading option for my site. All I want to do is:

<%= link_to 'Export', export_to_excel_path(:param => @item.id), url_for(:format => 'xls') %>

I want to give my user a link to export to excel, with the additional param. I get the following error:

undefined method `stringify_keys' for "/controller/show.xls":String

I need to use url_for because in export_to_excel, I have a

respond_to

in order to respond with a .xls MIME type file. I am using the to_xls gem, and everything works fine except that I'm not able to figure out this link.

4

1 に答える 1

0

jdoe のすべての功績:

 <%= link_to 'Export', export_to_excel_path(:param => @item.id, :format => 'xls') %>
于 2012-12-05T19:12:57.010 に答える