Permalink
Browse files

mobile_fu to allow for format.javascript in the respond_to block of c…

…ontrollers
  • Loading branch information...
1 parent 9a705c7 commit 41dd15c253fc52824d02fe80dbaa4e81e980f536 @revgum revgum committed Aug 25, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mobile_fu.rb
View
@@ -70,7 +70,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?
+ if is_mobile_device? && !request.xhr?
request.format = session[:mobile_view] == false ? :html : :mobile
session[:mobile_view] = true if session[:mobile_view].nil?
end

0 comments on commit 41dd15c

Please sign in to comment.