In my Rails app, I have some files in the /public directory which I want to write hyperlinks to in the views. How do I do this other than writing old HTML like <a href...
Is there a neat link_to
way?
In my Rails app, I have some files in the /public directory which I want to write hyperlinks to in the views. How do I do this other than writing old HTML like <a href...
Is there a neat link_to
way?
There's nothing wrong with using the anchor element, after all that's what link_to
outputs anyway. However, you should just be able to do:
<%= link_to 'Some File', '/some_file.zip' %>