[Rails] Re: attachment_fu, how to regenerate thumbnails

2016-05-04 Thread xist01
Hello! This is old thread but i need some help! I'd like to take foz's solution for my project using attachment_fu. I am going to make link to remake thumbs in my view, and i don't need to rake task. But I don't know where I should put 'remake_thumbnails!' method in. I've tried to put the metho

[Rails] Re: attachment_fu, how to regenerate thumbnails

2009-11-30 Thread foz
I use a method that rebuilds in my 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.creat

[Rails] Re: attachment_fu, how to regenerate thumbnails

2009-11-26 Thread MaD
why don't you just write a migration that loops all of those objects with the old thumbnail-information and call the method that generates the thumbnails again. like this: MyModel.find_all_with_thumbnails.each(&:generate_thumbnail) i'd like to add: i don't know your app and i don't use attachme