diff --git a/README.md b/README.md index c250d7e..acbbe39 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Mobile Fu Want to automatically detect mobile devices that access your Rails application? Mobile Fu allows you to do just that. People can access your site from a Palm, Blackberry, iPhone, iPad, Nokia, etc. and it will automatically adjust the format -of the request from :html to :mobile. +of the request from :html to :mobile or :tablet. Installation ------------ @@ -50,6 +50,9 @@ in a custom controller action. session[:mobile_view] # => Set to true if request format is :mobile and false if set to :html + session[:tablet_view] # => Set to true if request format is :tablet and false + if set to :html + So, different devices need different styling. Don't worry, we've got this baked in to Mobile Fu. diff --git a/lib/mobile-fu.rb b/lib/mobile-fu.rb index b25b89a..0849c57 100644 --- a/lib/mobile-fu.rb +++ b/lib/mobile-fu.rb @@ -97,7 +97,7 @@ def force_mobile_format session[:mobile_view] = true if session[:mobile_view].nil? end end - + # Forces the request format to be :tablet def force_tablet_format unless request.xhr?