I want to log in the database the incident when a users account is locked. I'm using Rails3 and Devise, so I think I'll need to override some action in a Devise controller, I just don't know which controller/action and how to capture the users Id. Any tips?
Asked
Active
Viewed 540 times
1
-
Have you found a solution for this? – Andrei Zisu Jan 27 '13 at 19:08
1 Answers
1
I know this is an old question, but the easiest approach is probably to override lock_access! from the lockable mixin (in your user model):
def lock_access!
super
# record an account lock here
end
Andy Davis
- 1,393
- 1
- 13
- 24