Skip to content

Instantly share code, notes, and snippets.

@yaroslav
Created September 15, 2008 10:50
Show Gist options
  • Save yaroslav/10832 to your computer and use it in GitHub Desktop.
Save yaroslav/10832 to your computer and use it in GitHub Desktop.
Regenerate/update thumbnails for attachment_fu Model
def update_thumbnails
temp_file = create_temp_file
attachment_options[:thumbnails].each { |suffix, size| create_or_update_thumbnail(temp_file, suffix, *size) }
save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment