Created
June 14, 2012 19:27
-
-
Save brandon-beacher/2932392 to your computer and use it in GitHub Desktop.
This file contains 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 AgencyImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
version :resized do | |
process resize_and_pad: [571, 197] | |
end | |
version :resized_for_featured do | |
process resize_and_pad: [457, 156] | |
end | |
version :thumbnailed do | |
process resize_and_pad: [220, 75] | |
end | |
def store_dir | |
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" | |
end | |
end |
This file contains 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 AgencyProjectImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
version :resized do | |
process resize_and_pad: [240, 89] | |
end | |
def store_dir | |
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" | |
end | |
end |
This file contains 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 UserPhotoUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
version :resized do | |
process resize_to_limit: [149, 144] | |
end | |
version :thumbnailed do | |
process resize_to_limit: [21, 21] | |
end | |
version :thumbnailed_for_review do | |
process resize_to_limit: [37, 38] | |
end | |
def store_dir | |
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment