diff --git a/lib/mobile_fu.rb b/lib/mobile_fu.rb index 70c6163..a059206 100644 --- a/lib/mobile_fu.rb +++ b/lib/mobile_fu.rb @@ -69,7 +69,7 @@ def force_mobile_format # the user has opted to use either the 'Standard' view or 'Mobile' view. def set_mobile_format - if is_mobile_device? && !request.xhr? + if request.format.html? && is_mobile_device? && !request.xhr? request.format = session[:mobile_view] == false ? :html : :mobile session[:mobile_view] = true if session[:mobile_view].nil? end