Skip to content

Commit

Permalink
mobile_fu to allow for format.javascript in the respond_to block of c…
Browse files Browse the repository at this point in the history
…ontrollers
  • Loading branch information
revgum committed Aug 25, 2009
1 parent 9a705c7 commit 41dd15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mobile_fu.rb
Expand Up @@ -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
Expand Down

0 comments on commit 41dd15c

Please sign in to comment.