Skip to content

Instantly share code, notes, and snippets.

@cgallagher
Created November 1, 2012 17:35
Show Gist options
  • Save cgallagher/3995245 to your computer and use it in GitHub Desktop.
Save cgallagher/3995245 to your computer and use it in GitHub Desktop.
Validating Paperclip
# check the type of file and tell them to F off if its wrong.
validates_attachment :image, :presence => true, :size => { :in => 0..10.kilobytes }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment