Created
July 24, 2018 08:52
-
-
Save pashagray/2b8f94b7d7e3da70cb9076ec607918c5 to your computer and use it in GitHub Desktop.
Carrierwave fog recreate/reprocess
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
Photosession.all.each do |p| | |
p.photos.each do |ph| | |
begin | |
p.process_photos_upload = true | |
ph.cache_stored_file! | |
ph.retrieve_from_cache!(ph.cache_name) | |
ph.recreate_versions!(:xl, :l, :m, :s, :xs) | |
p.save! | |
rescue => e | |
puts "ERROR: YourModel: #{e.to_s}" | |
end | |
end;nil | |
end;nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment