Forum: Ruby on Rails attachment_fu

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2258c43182638a619920180e9e7de5bf?d=identicon&s=25 fernando (Guest)
on 2007-07-21 17:16
(Received via mailing list)
I am getting a bizarre problem using attachment_fu and I was wondering
if anyone knows how to fix it/ why its happening.

Ive been following:
http://clarkware.com/cgi/blosxom/2007/02/24

and I am up and running as far as upload etc goes, but when it comes
to display using:
<% for mugshot in @mugshots -%>
  <%= link_to image_tag(mugshot.public_filename(:thumb)),
mugshot.public_filename %>
<% end -%>

I get two images, one is a thumbnail which links to the original file.
That is what I want.
html:
<a href="/image_uploads/0000/0001/test.JPG"><img alt="Test_thumb"
src="/image_uploads/0000/0001/test_thumb.JPG?1185027500" /></a>

 but the other is:
 <a href="/image_uploads/0000/0001/test_thumb.JPG"><img
alt="Test_thumb_thumb" src="/image_uploads/0000/0001/
test_thumb_thumb.JPG" /></a>

does anyone know where on earth the '_thumb_thumb' came from?
and does anyone know how to solve this problem?
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2007-07-21 18:05
(Received via mailing list)
On 7/21/07, fernando <tim.fernandezhart@gmail.com> wrote:
>   <%= link_to image_tag(mugshot.public_filename(:thumb)),
>  <a href="/image_uploads/0000/0001/test_thumb.JPG"><img
> alt="Test_thumb_thumb" src="/image_uploads/0000/0001/
> test_thumb_thumb.JPG" /></a>
>
> does anyone know where on earth the '_thumb_thumb' came from?
> and does anyone know how to solve this problem?

@mugshots has the thumbnail too.  Filter it by selecting where
parent_id is null.

--
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
This topic is locked and can not be replied to.