How to convert activerecord result into a hash?
<p>I have a query that returns results in ActiveRecord successfully.</p>

<pre><code>select
    trunc(b.transaction_date) as transaction_date,
    sum(a.transaction_amount) as transaction_amount
from
  payment_transaction a,
  payment_settlement b
where
    a.transaction_status = 'S'
    and b.settlement_type = 'D'
    and trunc(b.transaction_date) &gt; sysdate - 30
    and a.payment_transaction_id = b.payment_transaction_id
group by
    trunc(b.transaction_date)
order by
    trunc(b.transaction_date)
</code></pre>

<p>The above query returns 9 results. </p>

<p>What I want is to convert the entire result obtained above into a hash such as:</p>

<pre><code>{
"01/01/16" =&gt; 764.00, 
"02/01/16" =&gt; 1508.00, 
"03/01/16" =&gt; 2000.00 
..
..
..
}
</code></pre>

<p>How can I achieve this?</p>