title: Methods for limiting the Rails render format to html
body: <p>I have a Rails 2.1.2 site that only has html templates e.g. jobs.html.erb, so when I request a restful resource:</p>
  
  <blockquote>
    <p>www.mysite.com/jobs/1</p>
  </blockquote>
  
  <p>It renders my job in html, however, if I request:</p>
  
  <blockquote>
    <p>www.mysite.com/jobs/1.xml</p>
  </blockquote>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>Template is missing Missing template
    jobs/show.xml.erb in view path
    c:/workspace/mysite/app/views</p>
  </blockquote>
  
  <p>What's worse is that I can also request something like</p>
  
  <blockquote>
    <p>www.mysite.com/jobs/1.xyz</p>
  </blockquote>
  
  <p>And indeed I see the error:</p>
  
  <blockquote>
    <p>Template is missing Missing template
    jobs/show.xyz.erb in view path
    c:/workspace/mysite/app/views</p>
  </blockquote>
  
  <p>To stricly present just html content, what is the cleanest and simplest way to tell Rails that I don't want to render anything other than .html.erb files.</p>
  
  <p>It is important to note that:</p>
  
  <ul>
  <li>Some of my controller actions contain conditional calls to the render() method whilst others use the default Rails behaviour i.e. if you don't call render() then the template named youraction.html.erb will be rendered.</li>
  <li>My code does not use the responds_to() method</li>
  </ul>
  
  <p>It would be great if the solution was not at the render/responds_to level as I would have to modify a significant number of actions. Perhaps there is a way to configure Rails so that only html templates are rendered?</p>