Module: ImageCropper
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/image_cropper.rb
Instance Method Summary collapse
-
#crop_image ⇒ Object
This simply makes carrierwave and rmagick recreate all its versions.
Instance Method Details
#crop_image ⇒ Object
This simply makes carrierwave and rmagick recreate all its versions. We only call it if the ‘crop_x` attribute is present, as we use that as our trigger. Otherwise, we’re recreating versions without changing anything.
20 21 22 |
# File 'app/models/concerns/image_cropper.rb', line 20 def crop_image filename.recreate_versions! if crop_x.present? end |