browser: Some methods are not working

Description

I’m using the gem with Rails integration and some methods are not working with this recent upgrade (2.0.1).

How to reproduce

  1. browser.device.mobile?
  2. browser.platform.ios?

What do you expect

  1. true/false
  2. true/false

What happened instead

  1. undefined method `device’ for #Browser:0x007fb232327b20
  2. undefined method `ios?’ for :mac:Symbol

Software:

  • Rails version: 4.2.5.1
  • Browser gem version: 2.0.1

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@jengweneg Looks like you upgraded to v2. Change all calls from browser.mobile? to browser.device.mobile?.