I\'m using this code (taken from here) in ApplicationController to detect iPhone, iPod Touch and iPad requests:
before_filter :detect_mobile_request, :detec
The way that I'm handling this is to simply skip_before_filter
on those requests that I know I want to render the HTML views for. Obviously, that will work with partials.
If your site has a lot of mobile and/or tablet views, you probably want to set your filter in ApplicationController
and skip them in subclasses, but if only a few actions have mobile specific views, you should only call the before filter on those actions/controllers you want.