Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Matt Connolly's Profile

GitHub User: soundevolution

Comments by Matt Connolly

Avatar

You probably want to add something like this if you don't want to break xml or json output, (with responds_to blocks):

ruby
def prepare_for_mobile
  if request.format == 'text/html'
    session[:mobile_param] = params[:mobile] if params[:mobile]
    request.format = :mobile if mobile_device?
  end
end