Reputation: 41999
I want to allow users to my site to download Word (and other )files. Is there a gem that's works with Rails 3.1 which allows this, or another straightforward way to do it?
The files are regular text files, unrelated to the code that makes the actual app. For example, the files might contain stories and poems etc
Upvotes: 1
Views: 73
Reputation: 77786
If a file exists in the public/
directory, all you have to do is create a link to the file
E.g., If you have public/shared/my_file.doc
, you can create a link using:
<%= link_to 'My File', '/shared/my_file.doc' %>
Upvotes: 3