FEATURE: add the first 3 participants in a private message

This commit is contained in:
Régis Hanol
2014-05-12 09:32:49 +02:00
parent 557dc76c07
commit 9125453628
15 changed files with 166 additions and 52 deletions

View File

@@ -13,11 +13,11 @@ class AvatarLookup
def self.lookup_columns
@lookup_columns ||= [:id,
:email,
:username,
:use_uploaded_avatar,
:uploaded_avatar_template,
:uploaded_avatar_id]
:email,
:username,
:use_uploaded_avatar,
:uploaded_avatar_template,
:uploaded_avatar_id]
end
def users
@@ -27,12 +27,9 @@ class AvatarLookup
def user_lookup_hash
# adding tap here is a personal taste thing
hash = {}
User
.where(:id => @user_ids)
.select(AvatarLookup.lookup_columns)
.each{|user|
hash[user.id] = user
}
User.where(:id => @user_ids)
.select(AvatarLookup.lookup_columns)
.each{ |user| hash[user.id] = user }
hash
end
end