In my Rails 4.2 app I have a simple controller action that downloads a ZIP file:
class PresskitController < ApplicationController
def download
respond_to do |format|
format.zip do
send_data(Presskit.new, :filename => "presskit.zip")
end
end
end
end
This URL works great: http://www.myapp.com/presskit.zip
Is there a way to make this URL work without the extension as well? So that clicking on http://www.myapp.com/presskit
would also trigger the download?
Thanks for any help.