From 5415490e313224a078f625c3976a5e7d24b849b7 Mon Sep 17 00:00:00 2001 From: Mohd Zaid Date: Sat, 11 Feb 2012 17:01:52 +0800 Subject: [PATCH] updated readme --- README.md | 5 ++++- lib/mobile-fu.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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?