Ruby on Rails Wednesday, March 26, 2014



On Wednesday, March 26, 2014 2:29:37 AM UTC, Vell wrote:

app/views/blogs/show.html.erb

<% for attachment in @blog.blog_attachments %>
  <%= link_to attachment.document_file_name, download_blog_attachments_path(id: attachment.id), remote: true, method: :get %>
<% end %>

don't use remote:true (ajax) here: javascript has not access to the filesystem and so cannot write the file to disk

Fred 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a9d4ffde-5847-4711-8e03-d33f2c613526%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment