Reputation: 13
I have controller and a action method called download, here is the code snippet def download send_file Rails.root.join('public', 'abc.pdf'), :type=>"application/pdf", :x_sendfile=>true end And in my view, I have link as follows <%= link_to 'Download Full CV', {:action => :download}, :class => "btn btn-primary btn-md" %>
Everything works just fine in my DEV but after moving to heroku its not working
I have tried modifying production.rb as follows but no luck config.serve_static_assets = true
Can anyone help me on this, by the way the file is located in public folder and I am precompiling assets locally before moving to heroku
Upvotes: 1
Views: 318
Reputation: 1394
Just in case someone else needs this, verify the file was pushed to Heroku. If you are using a .slugignore file that ignores pdf's, this may also be the problem.
Upvotes: 0