Hi all;
I'm just passing along something I discovered that wasn't entirely obvious to me. In trying to recover a password as a test, I was baffled why I was getting the reset email for one account, but not for another.
It turns out that the :request_password_reset cycle will return without doing anything if you model has any validations on it that fail, and no validation failure is reported or recorded in the log. There was no hint that something was failing.
In my case, I had a "preauth" field in my User model that was supposed to be between a min and max value:
validates :preauth, :inclusion => { :in => Yetting.preauth_min..Yetting.preauth_max, :message => proc { I18n.t('preauth_limit', :preauth_min => Yetting.preauth_min, :preauth_max => Yetting.preauth_max) } }
And, the record that failed to issue the password reset email had a preauth field value that did not pass the validation. The field happened to be Null.
Hopefully, this little nugget will save someone else some lost time.
Tim