Skip to content
Browse files

Refactor user index

  • Loading branch information...
1 parent 33bfe61 commit 1bcb084e19d09f10ffa68775ce6bd538f98e737d Olivier SCHNEIDER committed
Showing with 5 additions and 6 deletions.
  1. +4 −0 app/views/users/_user.html.erb
  2. +1 −6 app/views/users/index.html.erb
View
4 app/views/users/_user.html.erb
@@ -0,0 +1,4 @@
+<li>
+ <%= gravatar_for user, size: 30 %>
+ <%= link_to user.name, user %>
+</li>
View
7 app/views/users/index.html.erb
@@ -4,12 +4,7 @@
<%= will_paginate %>
<ul class="users">
- <% @users.each do |user| %>
- <li>
- <%= gravatar_for user, size: 30 %>
- <%= link_to user.name, user %>
- </li>
- <% end %>
+ <%= render @users %>
</ul>
<%= will_paginate %>

0 comments on commit 1bcb084

Please sign in to comment.
Something went wrong with that request. Please try again.