-
-
Save dhamkur/3dd903931fe5e1959a26ba65ebe4907a 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