title: How do I get Rails to generate JSON in the correct format for ember.js?
body: <p>In the Ember guide on models <a href="http://emberjs.com/guides/models/the-rest-adapter/#toc_relationships" rel="nofollow">http://emberjs.com/guides/models/the-rest-adapter/#toc_relationships</a> I see that associations should be specified as an array of ids:</p>
  
  <blockquote>
    <p>{
          "post": {
            "comments": [1, 2, 3]
          }
        }</p>
  </blockquote>
  
  <p>I'm having trouble working out how to generate the array of ids in the rails controller. While I can :include the associated models, they are included as an array of hashes:</p>
  
  <blockquote>
    <p>{"name":"Jane's Place","rooms":[{"id":1},{"id":2},{"id":3}]}</p>
  </blockquote>
  
  <p>Any ideas on how one would get the array form?</p>