Convert erb to haml files

This commit is contained in:
benji 2015-09-08 19:39:13 +02:00
parent 19a6f4b921
commit 272923d08d
4 changed files with 34 additions and 48 deletions

View file

@ -1,20 +0,0 @@
<h2>Users</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Balance</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= user.id %></td>
<td><%= user.name %></td>
<td><%= user.balance %></td>
</tr>
<% end %>
</tbody>
</table>

View file

@ -0,0 +1,13 @@
%h2 Users
%table
%thead
%tr
%th ID
%th Name
%th Balance
%tbody
- @users.each do |u|
%tr
%td= u.id
%td= u.name
%td= u.balance

View file

@ -1,28 +0,0 @@
<h2><%= @user.name %></h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Debtor</th>
<th>Creditor</th>
<th>Amount</th>
<th>Origin</th>
<th>Message</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<% @user.transactions.each do |transaction| %>
<tr>
<td><%= transaction.id %></td>
<td><%= transaction.debtor.name %></td>
<td><%= transaction.creditor.name %></td>
<td><%= transaction.amount %></td>
<td><%= transaction.origin %></td>
<td><%= transaction.message %></td>
<td><%= transaction.created_at %></td>
</tr>
<% end %>
</tbody>
</table>

View file

@ -0,0 +1,21 @@
%h2= @user.name
%table
%thead
%tr
%th ID
%th Debtor
%th Creditor
%th Amount
%th Origin
%th Message
%th Time
%tbody
- @user.transactions.each do |t|
%tr
%td= t.id
%td= t.debtor.name
%td= t.creditor.name
%td= t.amount
%td= t.origin
%td= t.message
%td= t.created_at