RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: tisba
Site: http://tisba.github.com
I'm wondering what the cleanest way of adding custom validations to a Uploader is. Of corse you can add a validation to your AR model, but that feels kind of messy. In my use case I need to validate the content type (not only the file extension).
Any ideas how to do that?
I'm wondering what the cleanest way of adding custom validations to a Uploader is. Of corse you can add a validation to your AR model, but that feels kind of messy. In my use case I need to validate the content type (not only the file extension).
Any ideas how to do that?