<%= render :partial => "users/user", :collection => @users %>
Create a partial user user the users folder in that partial we can display the results without writing any loops or blocks by simply using the user object.
<p>
<strong>User Name:</strong>
<%= user.name %>
</p>
<p>
<strong>Location:</strong>
<%= user.location %>
</p>
No comments:
Post a Comment