Skip to content

Instantly share code, notes, and snippets.

@dabonka
Created November 2, 2015 21:38
Show Gist options
  • Save dabonka/694b17b6d6d9bbc79443 to your computer and use it in GitHub Desktop.
Save dabonka/694b17b6d6d9bbc79443 to your computer and use it in GitHub Desktop.
view
<head>
<title>Cards</title>
<link rel="stylesheet" href="application.css">
</head>
<h1>Listing cards</h1>
<table>
<tr>
<th>Original Text</th>
<th>Translated Text</th>
<th>Review Date</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<% @cards.each do |card| %>
<tr>
<td><%= card.original_text %></td>
<td><%= card.translated_text %></td>
<td><%= card.review_date.strftime("%d/%m/%Y") %></td>
<td><%= link_to("Edit", edit_card_path(card) ) %></td>
<td><%= link_to("Delete",card_path(card), method: :delete) %></td>
</tr>
<% end %>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment