Possible Duplicate:
Auto detect mobile browser (via user-agent?)
Rails 3: HTTP_USER_AGENT
Is there a way to detect the user agent from a current visitor? I'm currently working on a project to display video files. But for the ipad, iphone / samsung galaxy tab / internet explorer / firefox. I need to display video's is there a solid way to check which browser is visiting my rails app?
Thanks guys!
Yep, just use this
request.env["HTTP_USER_AGENT"]
#or
request.user_agent