In one of our web applications we needed to track user logins (when and from where a user logs in), and display them to the website admin.
When a user logs in, it stores the IP address, user agent and it tries to determine the location using GeoIP.
Add this line to your application's Gemfile:
And then run:
Or install it yourself as:
$ gem install activeadmin-logins
$ rails generate active_admin:logins:install $ rake db:migrate
In case you haven't generated activeadmin user resource:
$ rails g active_admin:resource user