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
If I set up a User model using Devise, and add validations to the password like this:
validates:password,presence: true,# length validation is configured in the Devise initialiserformat: {with: %r{\A.*[^a-zA-Z].*\z},message: 'must contain at least one non-letter',}
I get this error:
ColumnPresenceChecker fail User password column (password) is missing in
table (users) but used for presence validation
This is happening because the password is stored in the database as encrypted_password — but it's obviously not much use running the validation against the encrypted version :)
Is there a way around this apart from disabling ColumnPresenceChecker for that column? It would be useful if database_consistency could know that a password validation would be saved as encrypted_password when Devise was being used (or, more generically, if there was a way of specifying the mapping in database_consistency.yml)
The text was updated successfully, but these errors were encountered:
If I set up a User model using Devise, and add validations to the password like this:
I get this error:
This is happening because the password is stored in the database as
encrypted_password
— but it's obviously not much use running the validation against the encrypted version :)Is there a way around this apart from disabling ColumnPresenceChecker for that column? It would be useful if database_consistency could know that a
password
validation would be saved asencrypted_password
when Devise was being used (or, more generically, if there was a way of specifying the mapping in database_consistency.yml)The text was updated successfully, but these errors were encountered: