lib/rack/schmobile/request_extension.rb in schmobile-0.2.0 vs lib/rack/schmobile/request_extension.rb in schmobile-0.3.0
- old
+ new
@@ -7,9 +7,13 @@
end
@is_mobile
end
+ def toggle_mobile_session!
+ session[Rack::Schmobile::IS_MOBILE] = !is_mobile?
+ end
+
def is_device?(identifier)
user_agent =~ /#{identifier}/i
end
end
end