Created
June 2, 2011 18:51
-
-
Save brandon-beacher/1005026 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 DriversLicenseUploader < CarrierWave::Uploader::Base | |
storage :file | |
end | |
class HeadshotUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
storage :fog | |
process :resize_to_fit => [800, 800] | |
version :thumb do | |
process :resize_to_fill => [200,200] | |
end | |
end | |
add_column :employees, :drivers_license, :string | |
add_column :employees, :headshot, :string | |
class Employee < ActiveRecord::Base | |
mount_uploader :drivers_license, DriversLicenseUploader | |
mount_uploader :headshot, HeadshotUploader | |
end | |
add_column :employees, :headshot, :string | |
class Customer < ActiveRecord::Base | |
mount_uploader :headshot, HeadshotUploader | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment