miércoles, 21 de octubre de 2009

attachment_fu regenerate thumbnails

If you are using the attachment_fu plugin and for some reason you need to redo you thumbnails, then you need to know this definition that come as part of the pluging create_or_update_thumbnail(temp_file, file_name_suffix, *size)

for example:

On the console use the model


prod.each do | p|

p.create_or_update_thumbnail(RAILS_ROOT +'/public'+p.public_filename,:thumb,'300x300')


That is it will redo your thumbnail, of cource you can use it as you want. Enjoy!