Linking to external file in Ruby on Rails
- by Maestro1024
Linking to external file in Ruby on Rails
I have a file I want to share as a link in my rails app.
I create a link to it in the .erb file like this
<li><a href="somefile.pdf">Some File</a> </li>
When I select the link I get the following error.
Routing Error
No route matches "/pages/somefile.pdf"
with {:method=:get}
Do I really need a route for this? I really just want the save as dialog to popup. Just a link to a file that the user can open or download.
What is the rails way to do this (rails newbie here)?