how to make the rows of my user index view which i generated using scaffolding, to work as a hyperlink to the show user action. after clicking anywhere on the user row it will show us the corresponding user.
it is also acceptable if i can make link to a division.
code
<table>
<tr>
<th>Username</th>
<th></th>
<th>email</th>
<th>roll_no</th>
</tr>
<% @users.each do |user| %>
<tr >//i want to make these rows as link
<% if user.username!='admin' %>
<td><%= user.username %></td>
<td><%= user.email %></td>
<td><%= user.roll_no %></td>
<td><%= link_to 'show', @user %></td><br/>
<td><%= link_to 'Delete', user, confirm: 'Are you sure?', method: :delete %></td>
<% end %>
</tr>
` tags and back-ticks to format *blocks* of code. Just select the code and click the `{}` button, or indent the entire block by 4 spaces. – user229044 Apr 10 '12 at 17:39