Skip to content

Instantly share code, notes, and snippets.

@iwada
Created September 8, 2011 12:10
Show Gist options
  • Save iwada/1203250 to your computer and use it in GitHub Desktop.
Save iwada/1203250 to your computer and use it in GitHub Desktop.
Paperclip
I have this in my Model
validates_attachment_size :pic, :less_than=>15.kilobyte,
:if => Proc.new { |imports| !imports.pic_file_name.blank?
which should presumably rejects uploards larger than 15 Kb, but i can upload files larger than 15KB, it shows no errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment