Skip to content

Instantly share code, notes, and snippets.

@joesavak
Created May 6, 2011 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joesavak/959233 to your computer and use it in GitHub Desktop.
Save joesavak/959233 to your computer and use it in GitHub Desktop.
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