how can i detect browser type and its version in Rails. I want to put check on the version of specific browser and if its not required browser version than ask user to upgrade i
There is also useragent gem:
<% user_agent = UserAgent.parse(request.env["HTTP_USER_AGENT"]) %>
App: <%= user_agent.application %> # Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0)
Browser: <%= user_agent.browser %> # Firefox
Version: <%= user_agent.version %> # 22.0
Platform: <%= user_agent.platform %> # Macintosh
Mobile: <%= user_agent.mobile? %> # False
OS: <%= user_agent.os %> # OS X 10.8