In devise, there’s option Trackable to record sign in count and ip, but in some case there’s need to save custom logs in database. Turns out you can use Devise hook for that.
Just need to put this under config/initializer/devise.rb.
1 2 3 4 5 6 7 |
|
In devise, there’s option Trackable to record sign in count and ip, but in some case there’s need to save custom logs in database. Turns out you can use Devise hook for that.
Just need to put this under config/initializer/devise.rb.
1 2 3 4 5 6 7 |
|