title: In Rails 3, respond_to and format.all works differently than Rails 2?
body: <p>the code</p>
  
  <pre><code>respond_to do |format|
    format.html
    format.json { render :json =&gt; @switches }
    format.xml { render :xml =&gt; @switches.to_xml }
    format.all { render :text =&gt; "only HTML, XML, and JSON format are supported at the moment." }
  end
  </code></pre>
  
  <p>the above will work in Rails 2.2.2.  But in Rails 3, getting controller/index.html or index on the browser will both fall into the last line: "only HTML and JSON format are supported at the moment."</p>
  
  <p>The only Rails doc I can find on this is</p>
  
  <p><a href="http://api.rubyonrails.org/classes/ActionController/MimeResponds/ClassMethods.html#method-i-respond_to" rel="noreferrer">http://api.rubyonrails.org/classes/ActionController/MimeResponds/ClassMethods.html#method-i-respond_to</a></p>
  
  <p>which current only states:</p>
  
  <pre><code>respond_to :html, :xml, :json
  </code></pre>
  
  <p>but they need separate templates for json and xml, and can't handle the "only HTML and JSON format are supported at the moment" case.</p>