Last active
August 29, 2015 13:55
-
-
Save laser/8691020 to your computer and use it in GitHub Desktop.
Asset Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AssetService | |
def prune_stale_images | |
Prunable.from_assets(Image.all).each do |image| | |
S3Object.delete image.s3_object_name, image.s3_bucket_name | |
image.destroy | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment