Rails link_to open a larger image
<% for photo in @article.attachments %>
<%= link_to image_tag('dinamic/'+photo.id.to_s+'/'+'thumbs_'+photo.image_file_name), "#{request.env["HTTP_HOST"]}/public/images/dinamic/"+photo.id.to_s+"/"+"originals_"+photo.image_file_name, :class => 'single_image'%>
<% end %>
Have you tried different browsers?
Try to capture HTTP communication how your app server sets Content-Disposition header attribute.
If you cannot control your server, you can do minicontroller which will render one tag with that image :)
<% for photo in @static.attachments %>
<a id="single_image" href="<%= image_path("dinamic/"+photo.id.to_s+"/"+"originals_"+photo.image_file_name) %>" > <%= image_tag('dinamic/'+photo.id.to_s+'/'+'thumbs_'+photo.image_file_name) %> </a>
<% end %>
Image_path solved this issue.
精彩评论