Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise CouldNotSetPasswordError more safely #489

Merged
merged 1 commit into from Apr 16, 2014

Commits on Apr 16, 2014

  1. Raise CouldNotSetPasswordError more safely

    It seems that adding a restriction to allow_value to raise
    CouldNotClearAttribute if nil cannot be set on the attribute in question
    broke a lot of people's tests. Really the only reason we added this was
    for validate_presence_of -- it rescued CouldNotClearAttribute and
    re-raised it as CouldNotSetPasswordError, but only for passwords and
    only if has_secure_password was being used. So, I've figured out another
    way of performing this check inside of validate_presence_of only to
    prevent tests that have nothing to do with from breaking unnecessarily.
    mcmire committed Apr 16, 2014
    Configuration menu
    Copy the full SHA
    a21426c View commit details
    Browse the repository at this point in the history