the code
respond_to do |format|
format.html
format.json { render :json => @switches }
format.xml { render :xml => @switches.to_xml }
format.all { r
The following works for me. I believe you have to specify the "render" part for html explicitly or it will use the format.any.
respond_to do |format|
format.html { render :html => @switches }
format.json { render :json => @switches }
format.xml { render :xml => @switches }
format.all { render :text => "we only have html, json, and xml" }
end