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):
responds_to
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
You probably want to add something like this if you don't want to break xml or json output, (with
responds_to
blocks):