1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise/models
Carlos Antonio da Silva a3ae35e9c9 Create a model hook around the lockable warden hook to reset attempts
Resetting failed attempts after sign in happened inside a warden hook
specific for the lockable module, but that was hidden inside the hook
implementation and didn't allow any user customization.

One such customization needed for example is to direct these updates to
a write DB when using a multi-DB setup. With the logic hidden in the
warden hook this wasn't possible, now that it's exposed in a model
method much like trackable, we can override the model method to wrap it
in a connection switch block for example, point to a write DB, and
simply call `super`.

Closes #5310
Related to #5264 and #5133
2021-04-02 15:45:25 -03:00
..
authenticatable.rb Add spaces around method arguments when setting default values 2020-08-31 18:15:45 -03:00
confirmable.rb Add spaces around method arguments when setting default values 2020-08-31 18:15:45 -03:00
database_authenticatable.rb Make a more accurate claim 2020-03-12 15:52:51 -03:00
lockable.rb Create a model hook around the lockable warden hook to reset attempts 2021-04-02 15:45:25 -03:00
omniauthable.rb Add the frozen_string_literal pragma comment to all Ruby files. (#4725) 2017-12-21 15:36:29 -02:00
recoverable.rb Add spaces around method arguments when setting default values 2020-08-31 18:15:45 -03:00
registerable.rb Add an option to not automatically sign in a user after changing a password (#4569) 2018-12-28 11:29:58 -02:00
rememberable.rb Remove all references to Plataformatec 2020-02-03 11:33:17 -05:00
timeoutable.rb Add the frozen_string_literal pragma comment to all Ruby files. (#4725) 2017-12-21 15:36:29 -02:00
trackable.rb Remove all references to Plataformatec 2020-02-03 11:33:17 -05:00
validatable.rb Fix rails 6.0.rc1 email uniqueness validation deprecation error 2019-04-26 14:20:30 +03:00