title: how to load an html fragment in rails with jquery?
body: <p>I am wondering how I may <code>jQuery.load</code> an HTML fragment returned by a model's <code>show</code> action. For example, <code>$("#container").load("/posts/34")</code>. The problem with this is that it returns the view I want embedded in the layout, as if I were to visit that url in the browser. I <em>only</em> want the <code>Post</code>'s <code>show</code> HTMl fragment.</p>
  
  <p>Thanks!</p>
  
  <p><strong>Clarification</strong>: I want the <code>show</code> view to continue to render within the application layout when going to the <code>show</code> action in my browser. I'm merely trying to figure out how to fetch <em>only</em> the html of the <code>show</code> view for when I want to load it asynchronously with jQuery. I have seen guides in which they create <code>show.js.erb</code> and then render the html view there, but it seems pretty messy to me, escaping all of that html for javascript. If this is the accepted and proper way of doing this though I guess I'll follow the standard. I was just wondering if it were possible to only fetch the html of a particular view.</p>