title: Issues rendering text into json response in rails controlelr
body: <p>I'm trying to return json from my method in my app</p>
  
  <p>Heres what i have</p>
  
  <pre><code> doc.css(".secondary-text").each do |t|
     price1 = t.text
      respond_to do |format|
        format.json  { render :json =&gt; {:testing =&gt; price1}}
      end
   end
  </code></pre>
  
  <p>However i'm getting <code>DoubleRenderError</code>. Whats returned is this: </p>
  
  <pre><code>(Â£28.50 Ticket + Â£4.00 Fees)
  (Â£35.00 Ticket + Â£5.25 Fees)
  (Â£22.50 Ticket + Â£3.50 Fees)
  (Â£35.00 Ticket + Â£5.25 Fees)
  (Â£22.50 Ticket + Â£3.50 Fees)
  </code></pre>
  
  <p>Is it because its inside the each method?</p>
  
  <p>Thanks</p>