Created
November 23, 2014 13:46
-
-
Save walidvb/65ae97800b6de94ba329 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
config.paperclip_defaults = { | |
:storage => :fog, | |
:fog_credentials => {:provider => "Local", :local_root => "#{Rails.root}/public"}, | |
:fog_directory => "/public", | |
:fog_host => 'localhost:3000' | |
} |
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 Artist < ActiveRecord::Base | |
has_attached_file :profile_picture, | |
:styles => { | |
:thumb => "100x100#", | |
:small => "150x150>", | |
:medium => "200x200" }, | |
:path => "artists/:name/profile_:basename_:style.:extension", | |
:default_url => "/images/missing.jpg" | |
validates_attachment_content_type :profile_picture, :content_type => /\Aimage\/.*\Z/ | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment