Created
October 23, 2013 20:39
-
-
Save davidrhoden/7126267 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
where the partial is called: | |
<ul class="user_avatars"> | |
<%= render :partial => 'users/user_avatar', collection: @users %> | |
<%= render @users %> | |
</ul> | |
_user_avatar.html.erb: | |
<li> | |
<%= image_tag @users.avatar.url(:thumb) %> | |
</li> | |
_user.html.erb: | |
<li> | |
<%= image_tag user.avatar.url(:thumb) %> | |
<%= link_to user.nice_name, user %> | |
<li> | |
Also, I have this in the pages controller, which controls the home page, where these are called: | |
def home | |
@title = "Home" | |
@users = User.order('created_at DESC').limit(9) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment