Skip to content

Instantly share code, notes, and snippets.

@tomtt
Created May 3, 2011 14:24
Show Gist options
  • Save tomtt/953415 to your computer and use it in GitHub Desktop.
Save tomtt/953415 to your computer and use it in GitHub Desktop.
index.html.erb
% @pacients.each do |pacient| %>
<tr>
<td><%= pacient.nume %></td>
<td><%= pacient.prenume %></td>
<td><%= pacient.cnp %></td>
<td><%= pacient.protocolu %></td>
<td><%= pacient.data_integrarii %></td>
<td>
<%- if last_protocol = pacient.protocols.last %>
<%= last_protocol.data %>
<%= last_protocol.program %>
<% end %>
</td>
<td><%= link_to 'Show', pacient %></td>
<td><%= link_to 'Edit', edit_pacient_path(pacient) %></td>
<td><%= link_to 'Destroy', pacient, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment