You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In trying to get my existing app to run with master in prep for a new release, the new ActiveRecord validations are causing problems.
First, I do not think it's desirable to add new validations that are turned on by default. Validations in Rails don't work that way -- they're there if you need them, but they're not activated by default.
Second, I can't figure out how actually turn off the validations that are turned "on" by default (Unique Filename and Filename Format). I've tried:
It looks like the validations can only be deactivated in the global Carrierwave config block. But at the moment I've not figured out how to make that work either.
Anyway, not sure we should push out a new release with these defaulting to on. Will likely cause grief for many.
The text was updated successfully, but these errors were encountered:
What are the validation error you are getting?
The only validation changes are from ac43297
I agree we should not have breaking changes with a new release.
@p8 my unit tests were failing due to the filename_format and unique_filename validations, which as you noted are new since 0.0.15.
It took me a while to figure out where the failures were coming from; while I could work around them by adjusting my config to turn off the validations, it was an unwelcome surprise.
I'm not totally clear on the use case behind the validations; the syntax presented in the documentation makes them seem like ActiveRecord-type validations (that's how they're implemented), but the fact that several of them default to "true" (i.e. on) is inconsistent with AR validations in general. I.e., you can't actually turn them off within the model, you have to turn them off globally first in your config file.
I really think the validations should all default to false because they are new and haven't been previously enabled for existing users.
In trying to get my existing app to run with master in prep for a new release, the new ActiveRecord validations are causing problems.
First, I do not think it's desirable to add new validations that are turned on by default. Validations in Rails don't work that way -- they're there if you need them, but they're not activated by default.
Second, I can't figure out how actually turn off the validations that are turned "on" by default (Unique Filename and Filename Format). I've tried:
It looks like the validations can only be deactivated in the global Carrierwave config block. But at the moment I've not figured out how to make that work either.
Anyway, not sure we should push out a new release with these defaulting to on. Will likely cause grief for many.
The text was updated successfully, but these errors were encountered: