A question on Active Storage
: I just updated to rails 5.2 and I am trying to open the attached document which is saved as a blob
. Currently, it's redirecting to root_path
, any idea how can I open/download it instead?
My code in Rails view is:
<%= link_to(document.filename, rails_blob_path(document, disposition: "attachment")) %>
To Download:
<%= link_to document.filename, rails_blob_path(document, disposition: 'attachment') %>
To Preview:
<%= link_to document.filename, rails_blob_path(document, disposition: 'preview') %>