I am new to Ruby on Rails(rails 3). I am having a form with three fields and among these three field, one field is to upload files(rar/tar/zip). I would like to know the way to validate (server side) such form that allow user:-
1. Fill in all three fields.
2. Uploaded file should be either rar/tar/zip.
3. Uploaded file should not exceed 2MB in size.
U can use the paperclip gem for uploading a file.
there are validations like
see https://github.com/thoughtbot/paperclip for more info.