Fix has secure password #6215

Merged
merged 2 commits into from May 17, 2012

Conversation

Projects
None yet
6 participants
@erichmenge

Addresses issue of has_secure_password validating password_digest.

Closes #2884.
Closes #5418.
Closes #6185.

@erichmenge

This comment has been minimized.

Show comment
Hide comment
@carlosantoniodasilva

View changes

activemodel/lib/active_model/secure_password.rb
- validates_presence_of :password_digest
+
+ options[:validations] ||= true unless options.include?(:validations)
+ if options[:validations]

This comment has been minimized.

@carlosantoniodasilva

carlosantoniodasilva May 8, 2012

Member

You can use options.fetch(:validations, true) here.

@carlosantoniodasilva

carlosantoniodasilva May 8, 2012

Member

You can use options.fetch(:validations, true) here.

This comment has been minimized.

@jeremyf

This comment has been minimized.

Show comment
Hide comment
@jeremyf

jeremyf May 9, 2012

Contributor

The tests pass for this pull request. cc/ @josevalim

Contributor

jeremyf commented May 9, 2012

The tests pass for this pull request. cc/ @josevalim

@erichmenge

This comment has been minimized.

Show comment
Hide comment
@erichmenge

erichmenge May 11, 2012

Any feedback on this?

Any feedback on this?

@jeremyf

This comment has been minimized.

Show comment
Hide comment
@jeremyf

jeremyf May 11, 2012

Contributor
Contributor

jeremyf commented May 11, 2012

@tenderlove

This comment has been minimized.

Show comment
Hide comment
@tenderlove

tenderlove May 17, 2012

Member

@jeremyf thanks for verifying!

Member

tenderlove commented May 17, 2012

@jeremyf thanks for verifying!

@chancancode

This comment has been minimized.

Show comment
Hide comment
@chancancode

chancancode May 22, 2012

Member

@erichmenge @tenderlove Any chance of this making its way to 3-2-stable? This bug is stopping me from using the feature on 3.2 currently, as the error message is confusing to the users and there is no easy way to disable it. If there is interest in making this happen and no one has the time to do it, I can offer to do the backport patch.

Member

chancancode commented May 22, 2012

@erichmenge @tenderlove Any chance of this making its way to 3-2-stable? This bug is stopping me from using the feature on 3.2 currently, as the error message is confusing to the users and there is no easy way to disable it. If there is interest in making this happen and no one has the time to do it, I can offer to do the backport patch.

@josevalim

This comment has been minimized.

Show comment
Hide comment
@josevalim

josevalim May 22, 2012

Contributor

This pull request introduces a subtle change in behavior and therefore cannot go into 3-2-stable.

Contributor

josevalim commented May 22, 2012

This pull request introduces a subtle change in behavior and therefore cannot go into 3-2-stable.

@chancancode

This comment has been minimized.

Show comment
Hide comment
@chancancode

chancancode May 22, 2012

Member

Thanks for the clarification. Guess I'll have to monkey patch for the time being.

Member

chancancode commented May 22, 2012

Thanks for the clarification. Guess I'll have to monkey patch for the time being.

chancancode added a commit to chancancode/rails that referenced this pull request May 23, 2012

Added instructions for backporting changes to guides.
I was looking for instructions on backporting changes the other day and
wasn't able to find it anywhere. I updated the contrib guides based on
the disccusion in #6420, #6215 and #6447.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment