I ran across this post while looking for a solution to the same
problem. In the end, this worked for me in the attachment model class:
# use attachment_fu protected methods to remake thumbs
def remake_thumbnails!
self.thumbnails.each {|thumb| thumb.destroy}
temp_file = create_temp_file
attachment_options[:thumbnails].each do |suffix, size|
self.create_or_update_thumbnail(temp_file, suffix, *size)
end
end
I use this in a rake task so I can rebuild all thumbnails when needed.
cheers,
-foz
On Nov 9, 5:26 pm, Russell Fine
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I''ve just added a new thumbnail definition to a class that has
> attachments using attachment_fu. Since this thumbnail definition
didn''t
> exist when I uploaded pior images, they don''t have this thumbnail.
I
> have been trying to figure out how to either load the image attachment
> and have it build the thumbnail. Does anyone know how to do this?
>
> Thanks in advance.
>
> Russell
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.