``` ruby
@history = UserLoginHistory.create(user_id: current_user.id,
                                   login_ip: request.remote_ip,
                                   browser: user_agent.browser,
                                   platform: "#{user_agent.platform} #{user_agent.os}")
```