lib/rack/schmobile/request_extension.rb in schmobile-0.1.2 vs lib/rack/schmobile/request_extension.rb in schmobile-0.1.3
- old
+ new
@@ -7,9 +7,13 @@
return result unless result.nil?
end
false
end
+
+ def is_device?(identifier)
+ user_agent =~ /#{identifier}/i
+ end
end
end
end
Rack::Request.class_eval do