views:

45

answers:

1

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?

+2  A: 

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' %>
John Topley