Skip to content

Instantly share code, notes, and snippets.

@benjaminathlan
Created January 11, 2010 14:02
Show Gist options
  • Save benjaminathlan/274257 to your computer and use it in GitHub Desktop.
Save benjaminathlan/274257 to your computer and use it in GitHub Desktop.
<h1>Listing tasks</h1>
<table>
<tr>
<th>Name</th>
<th>Complete</th>
</tr>
<% @tasks.each do |task| %>
<tr>
<td><%=h task.name %></td>
<td><%=h task.complete %></td>
<td><%= task_complete? ? 'tache effectuée' : 'tache NON effectuée'%></td>
<td><%= link_to 'Show', task %></td>
<td><%= link_to 'Edit', edit_task_path(task) %></td>
<td><%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New task', new_task_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment