title: How to return a the index.html.erb in the js.html.erb file
body: <p>I have a controller like so:</p>
  
  <pre><code>  def index
      respond_to do |format|
        format.html {}
        format.js {render :layout =&gt; false}
      end
    end
  </code></pre>
  
  <p><strong>index.html.erb</strong></p>
  
  <pre><code>hello i"m index.html.erb
  </code></pre>
  
  <p><strong>index.js.erb</strong></p>
  
  <pre><code>&lt;%= render :template =&gt; "dashboard/index" %&gt;
  </code></pre>
  
  <p>What I want to do is have index.html or index.js return the same thing. But I can't see to do that without making index.html.erb a partial (_index.html.erb) but then when a user makes an html call that won't work.</p>
  
  <p>How can I get the index.js.erb to render index.html.erb? which I would then escape with jQuery. Thanks</p>