title: RAILS3: to_JSON with multiple objects and includes
body: <pre><code>def list
      @rings = Ring.order("RAND()")
      #JSON RENDERING
      render :json =&gt; @rings.to_json(:include =&gt; [:variations, :stones]), :callback =&gt; params[:callback]
  end
  
  def show
      @showring = Ring.includes(:stones, :variations).find(params[:id])
      @other_rings = Ring.select([:id, :stone_count]).where(:style_number =&gt; @showring.style_number).reject{ |ring| ring == @showring}
      #JSON RENDERING
      render :json =&gt; {@showring.to_json(:include =&gt;[:variations, :stones]), :other_rings =&gt; @other_rings}, :callback =&gt; params[:callback]
  end
  </code></pre>
  
  <p>My list view rendering works fine, but when i want to do a show view, with two objects, and showring with includes won't render proper JSON. It is quoting everything in the object with the includes... </p>
  
  <p>JSON output looks like this:</p>
  
  <p>showring => "{"available":"yes","eng...9","stone_y":"149.4"}]}"</p>
  
  <p>other_rings => properly rendered object</p>
  
  <hr>
  
  <p>On a seperate note, if i have already added the includes to @rings object, why do i then again have to add the association in the "to_json" method?</p>