Closed tejasbubane closed 9 years ago
@tejasbubane I think we should just put allow_blank: true
for password validation because we are logging in using Github auth. This will be in consistent with how we handle it in CodeTriage.
Seems good, curious but why || user.encrypted_password.nil?
We want to verify the password length when it's present that makes sense, but if the password isn't present, wouldn't the encrypted_password.nil?
always be true?
@schneems I misread it to be validates
instead of validates_length
. I think it makes sense in that case, correct me if I am wrong. Anyways, I am updating the PR as per @prathamesh-sonpatki's suggestion.
@schneems we don't need password actually. We use github auth right?
Yeah, it's the same as Code Triage which has:
validates_length_of :password, within: 8..128, allow_blank: true
:+1:
@prathamesh-sonpatki PR updated.
Fixes #29
The edit page was throwing error since
:daily_issue_limit
and:skip_issues_with_pr
fields were not present onuser
model. I have made the edit page consistent with theuser#show
page with only two fieldsemail
andprivate/public
.Also the password-length validation failed while updating user since the password field was empty. So I put in a condition on the validation.