Skip to content

Instantly share code, notes, and snippets.

@diegorv
Created April 16, 2009 00:56
Show Gist options
  • Select an option

  • Save diegorv/96133 to your computer and use it in GitHub Desktop.

Select an option

Save diegorv/96133 to your computer and use it in GitHub Desktop.
<h1>Listing employees</h1>
<table>
<tr>
<th>Name</th>
<th>Cpf</th>
<th>Rg</th>
<th>Company entry</th>
<th>Company left</th>
<th>Salary</th>
<th>Lunch money</th>
</tr>
<% @employees.each do |employee| %>
<tr>
<td><%=h employee.name %></td>
<td><%=h employee.cpf %></td>
<td><%=h employee.rg %></td>
<td><%=h employee.company_entry %></td>
<td><%=h employee.company_left %></td>
<td><%=h employee.salary %></td>
<td><%=h employee.lunch_money %></td>
<td><%= link_to 'Show', employee %></td>
<td><%= link_to 'Edit', edit_employee_path(employee) %></td>
<td><%= link_to 'Destroy', employee, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New employee', new_employee_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment