Check the request method, where you can get a ActionDispatch::Request where you have all the request parameters, including the user agent.
request.user_agent
Check the request method, where you can get a ActionDispatch::Request where you have all the request parameters, including the user agent.
request.user_agent