What's the easiest way to detect the user's operating system in Rails 3? -
simple rails app, scaffolding. want detect whether user using android or iphone access app. what's easiest way that?
if request.env['http_user_agent'].downcase.match(/android|iphone/) puts "yup, mobile" end
Comments
Post a Comment