How to give the xls file link in ruby. This is my file path
link_to "Excel", "/#{RAILS_ROOT}/public/reports/10014_ByNetwork.xls", :target=>"_blank"
当我上面给出的链接是将这样的如何在Ruby on Rails中提供xls文件链接?
<a href="//home/kiran/shekar/wavespot/public/reports/10014_ByNetwork.xls" target="_blank">Excel</a>
因此,它不能正常工作。其实我需要这样的
<a href="file:///home/kiran/shekar/wavespot/public/reports/10014_ByNetwork.xls" target="_blank">Excel</a>
请给我确切的路径...
你知道,这个链接只会在你的计算机上工作,不会在任何其他工作,对不对? – BroiSatse 2014-10-22 09:42:58
是的,我只需要在我的电脑中 – user748447 2014-10-22 09:50:06