title: Why do i get a circular reference exception when calling to_json on an ActiveRecord::Relation
body: <p>In Rails 3 (beta 3 on 1.8.7), when calling to_json on a relation i get a circular reference exception. Converting that relation to an array first, and THEN calling to_json works.</p>
  
  <p>Code That fails:</p>
  
  <p>Model.where().to_json (Where model is any model in your Rails 3 app)</p>
  
  <p>Code that works:</p>
  
  <p>Model.where().to_a.to_json</p>
  
  <p>This can be reproed on the console.</p>
  
  <p>Has anyone else run in to this? Is this expected?</p>