<%=h @transaction.description %> Transaction

"> <% @transaction.debit_amounts.each do |debit_amount| %> "> <% end %> <% @transaction.credit_amounts.each do |credit_amount| %> "> <% end %>
ID Description Debits Credits Date
<%=link_to(@transaction.id, transaction_path(@transaction)) %> <%=h @transaction.description %> <%=h @transaction.created_at %>
    <%=h "#{debit_amount.account.name}" %> <%=h debit_amount.amount %>
        <%=h "#{credit_amount.account.name}" %> <%=h credit_amount.amount %>

Go to <%= link_to 'Accounts', accounts_path %>