title: How return all elements array in Rails?
body: <p>I have a controller:</p>
  
  <pre><code>def grafico_gantt 
      @mapa = Hash.new
      @mapa[:tasks] = []
      @projeto.atividades.each do |a|
          @mapa[:tasks] &lt;&lt; {
             id:a.id,
             descricao:a.descricao,
             status:a.status,
             data_inicial:a.data_inicial.to_datetime.to_i*1000,
             tempo_gasto:a.tempo_gasto.to_i,
             data_final:a.data_final.to_datetime.to_i*1000
          }
      end
  end
  </code></pre>
  
  <p>And a .js.erb</p>
  
  <pre><code>&lt;script&gt;
      $(function() {
          "use strict";
          $(".gantt").gantt({
              source: [{
                  name: '&lt;%= raw @mapa[:tasks][0][:descricao] %&gt;',
                  desc: '&lt;%= raw @mapa[:tasks][0][:status] %&gt;'+"% concluído",
                  values: [{
                      from: "/Date(&lt;%= raw @mapa[:tasks][0][:data_inicial] %&gt;)/",
                      to: "/Date(&lt;%= raw @mapa[:tasks][0][:data_final] %&gt;)/",
                      label:"&lt;%= raw @mapa[:tasks][0][:descricao] %&gt;", 
                      customClass: "ganttRed"
                  }]
              }],
          scale: "days",
          minScale: "days",
          maxScale:"months",
          navigate: "scroll",
          waitText: "Aguarde...",
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I have 3 values in arrays, but, how can see, i just take 1, @mapa[:tasks][0][:descricao]
  How a can take all values? Because @mapa[:tasks][:descricao] don't work :/</p>
  
  <p>Thanks!</p>