title: RoR API RABL collection to array
body: <p>RABL Current Code :</p>
  
  <pre><code>object @region
  attributes :id, :name, :latitude, :longitude, :region_id
  child :sub_regions do
    attributes :name
  end
  </code></pre>
  
  <p>I get the following output :</p>
  
  <pre><code>{
      "id": 1,
      "name": "test",
      "latitude": "30.932351",
      "longitude": "92.83391",
      "region_id": 1,
      "sub_regions": [{
              "name": "1"
          }, {
              "name": "2"
          }, {
              "name": "3"
          }, {
              "name": "4"
          }, {
              "name": "5"
          }, {
              "name": "6"
          }, {
              "name": "7"
          }
      ]
  }
  </code></pre>
  
  <p>I want to remove name attribute and just display the values as an array
  But what I want is to convert the collection to an array like the output here :</p>
  
  <pre><code>{
      id: 1,
      name: "test",
      latitude: "30.932351",
      longitude: "92.83391",
      region_id: 1,
      sub_regions: [
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7"
      ]
  }
  </code></pre>
  
  <p>The closest I can get to this is by this RABL code :</p>
  
  <pre><code>code :sub_regions do |s|
    s["name"]
  end
  
  
  {
      {
            id: 1,
            name: "test",
            "latitude": "30.932351",
            "longitude": "92.83391",
            region_id: 1,
            sub_regions: "1"
      }
  
  }
  </code></pre>
  
  <p>By the above code block in show.json.rabl it displays only the first element, how do i make it an array with all the elements?</p>