use arel instead of sql query to fetch transactions. closes gh-394