jnicklas/carrierwave — pull request #706 by xtreme-tanzeeb-khalili (2012-04-17 22:14:04+00:00)
Title: ActiveModel validations for download errors

Hi,

I was trying out the ```remote_url``` functionality in my app when I realized there were no validation errors for downloads. Here's a patch that includes a ```DownloadError``` validation for remote files, in the same vein as the existing ```ProcessingError``` and ```IntegrityError``` validations. It works out of the box, with no additional configuration necessary.

One conscious design decision was to attach the error messages to the original column rather than the ```remote_url``` column. If the error is attached on the ```remote_url``` column, the original column could still show other validation errors (eg. 'cant be blank' w/ ```validates_presence_of```). On one hand, it's nice to see the error on the field that caused it, on the other it's nice not to have two messages for the same error. Couldn't decide, so I chose the latter.