RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: soundevolution
You probably want to add something like this if you don't want to break xml or json output, (with responds_to blocks):
if request.format == 'text/html'
session[:mobile_param] = params[:mobile] if params[:mobile]
request.format = :mobile if mobile_device?