Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jpeg & pjpeg
has_attached_file :user_pic, :styles => {
:thumb=>"50x50#"
},
:default_url => "/images/missing.png"
validates_attachment_size :user_pic, :less_than => 10.megabytes
validates_attachment_content_type :user_pic, :content_type => ['image/jpeg','image/jpg','image/png','image/gif','image/pjpeg']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment