Created
August 16, 2017 10:39
-
-
Save marmeladze/3260c82263b6d2c30ab63184962380a0 to your computer and use it in GitHub Desktop.
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 ImageUploader < CarrierWave::Uploader::Base | |
| include Cloudinary::CarrierWave | |
| process :tags => ['post_picture'] | |
| version :standard do | |
| process :resize_to_fill => [100, 150, :north] | |
| end | |
| version :article do | |
| resize_to_fit(400, 1100) | |
| end | |
| version :thumbnail do | |
| resize_to_fit(50, 50) | |
| end | |
| def public_id | |
| return model.title.parameterize | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment