2011-02-05 7 views
2


私のアプリはサムネイルを表示していますが、ダウンロードしたサムネイルをクリックすると表示されません。その仕組みは? link_to image_tag( 'lorem')、image_tag( 'lorem_big')?Rails link_to大きな画像を開く

<% 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 %> 

答えて

0
<% 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は、この問題を解決しminicontrollerを行うことができます。

0

さまざまなブラウザを試しましたか?

あなたのアプリケーションサーバーがContent-Dispositionヘッダー属性を設定する方法をHTTP通信でキャプチャしてみてください。

、あなたのサーバーを制御できない場合は、そのイメージと1個のタグをレンダリングしますどの:)

関連する問題