Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def download
- article = Article.find_by(id: params[:id])
- data = open("#{article.file}")
- send_data data, filename: "#{article.file}"
- end
- <td><%= link_to "Download File", download_article_path(article) %></td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement