Module: ActiveAuthentication::Model::Trackable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_authentication/model/trackable.rb
Instance Method Summary collapse
Instance Method Details
#track(request) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/active_authentication/model/trackable.rb', line 10 def track(request) self.sign_in_count += 1 self.last_sign_in_at = current_sign_in_at self.current_sign_in_at = Time.now self.last_sign_in_ip = current_sign_in_ip self.current_sign_in_ip = request.remote_ip save end |