this patch allows one to rais CarrierWave errors with custom messages. Prior to this patch all processing errors would read: 'failed to be processed' even when one raises a CarrierWave processing error with a custom message.
Similarly CarrierWave's own integrity error message is replaced with the rather short "is not an allowed file type" w/o explaining what extensions are accepted.
I hope you'll accept this patch.
- Allow for custom CarrierWave error messages.
Could you add some tests for this behaviour, not sure I quite understand what this is doing?
- I18n all error messages.
- Add test for all but mime_types
Jonas, I've added test cases and I18n all error messages. Give it try. See if you can force a ::MIME::InvalidContentType error, that is the only one missing.
@bartt I'm seeing "This pull request cannot be automatically merged." so you may need to rebase your commits in order for us to merge. I'd check with @jnicklas before doing more work, though -- I'm not clear on whether or not he's interested in merging.
Merge branch 'master' of git://github.com/jnicklas/carrierwave
@trevorturk, conflict resolved. I do hope @jnicklas will merge the changes as the current code doesn't allow for custom error messages. These changes allow for custom error messages while preserving i18n.
Merged -- thanks @bartt!