Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[Patch] Allow optional passwords in ActiveModel::SecurePassword

#6742

The ActiveModel::SecurePassword module is outstanding but I think allowing a password to be optional would allow many more use cases for this feature. E.g. an application using Omniauth in tandem with local authentication probably doesn't require a password for each User. The patch attached adds a :required configuration parameter (defaults to true) and ensures that the authenticate method returns false for a blank password.

This is my first patch submission so please forgive any faux pas I may have made. :)

Reported by Matthew Daubert · April 25th, 2011 @ 02:17 PM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Matthew Daubert
    Matthew Daubert

    Rebased patch to master 2bc4856..d4bea35

    April 25th, 2011 @ 02:22 PM