I have carrierwave with mongoid and I want validate atachment file size.
I take a look to:
https://github.com/jnicklas/carrierwave/wiki/How-to%3A-Validate-attachment-file-size
but this fix it does not works for me.
I have paste my code in the end from https://gist.github.com/1009861
Please how validate atachment file size in carrierwave with mongoid?
Thank you
I think your problem is current rails version not autoloading lib/ directory anymore.
In your config/application.rb insert a line
to load modules in your lib/ (and it’s subdirectories).
I’m using size check the way in the example, so pretty sure you can easily fix this issue.