add support for other Nexus devices as "mobile"

This commit is contained in:
Jeff Atwood
2016-03-15 16:46:41 -07:00
parent 3130dade49
commit d052f1746c
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
module MobileDetection
def self.mobile_device?(user_agent)
user_agent =~ /Mobile|webOS|Nexus 7/ && !(user_agent =~ /iPad/)
user_agent =~ /Mobile|webOS|Nexus (5|6|7)/ && !(user_agent =~ /iPad/)
end
# we need this as a reusable chunk that is called from the cache