title: RJS Handler missing
body: <p>I got a missing template error when I tried to achieve a task using RJS.</p>
  
  <p>All I want is to execute an RJS file on ajax call. But I am getting the
  following error.</p>
  
  <pre><code>ActionView::MissingTemplate (Missing template line_items/create,
  application/create with {:handlers=&gt;[:erb, :builder, :coffee],
  :formats=&gt;[:js, :html], :locale=&gt;[:en, :en]}. Searched in:
    * "&lt;MY APP PATH&gt;/app/views"
  ):
    app/controllers/line_items_controller.rb:46:in `create'
  </code></pre>
  
  <p>But the create.js.rjs is present in the folder /views/line_items. You
  can see the handlers miss .rjs extension. I think thats causing the
  error.</p>
  
  <p>If I change .rjs to .erb, it works and the content is executed as
  javascript and thus I need to modify the RJS functions to Javascript to
  return the contents of AJAX call.</p>
  
  <p>Could you please explain how I can attain this using RJS? Please help.</p>
  
  <p>Following is the versions of tools I use.</p>
  
  <pre><code>Ruby version  1.9.2 (i686-linux)
  RubyGems version  1.8.10
  Rack version  1.3
  Rails version  3.1.0
  JavaScript Runtime  Node.js (V8)
  Active Record version  3.1.0
  Action Pack version  3.1.0
  Active Resource version  3.1.0
  Action Mailer version  3.1.0
  Active Support version  3.1.0
  </code></pre>
  
  <p>Thanks in advance.</p>