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.
Code That fails:
Model.where().to_json (Where model is any model in your Rails 3 app)
Code that works:
Model.where().to_a.to_json
This can be reproed on the console.
Has anyone else run in to this? Is this expected?