hi help me in simple question:
how to released simple download:
i my public/data i have some.txt or some.pdf file ( with some text )
and i want to user click in some button and start download this file.
i do something like that
<%= link_to "Terms" ,:action => :download, :file_name => 'some.txt' %>
def download
send_file "#{RAILS_ROOT}/public/data/#{params[:file_name]}", :type=>"application/zip"
end
But what to do next?
PS if you have some tutorial or example on this subject (like downloading file), I would be very grateful

You are definitely missing a route in your
routes.rb:and then you can have a link like:
that will probably generate something like:
I think it’s still not the best solution, but solves your problem.
I recommend a quick look at this part of the Rails Guides to clarify this:
http://guides.rubyonrails.org/routing.html#adding-more-restful-actions
A complete read of this guides is always good and highly recommended too.