Commit 1d48904ac807c6d382c8965329085b321381cc3d
1 parent
abb31213
Exists in
spb-stable
and in
3 other branches
Show avatars in ajax user selectbox
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
12 additions
and
2 deletions
Show diff stats
app/assets/javascripts/users_select.js.coffee
app/assets/stylesheets/generic/selects.scss
lib/api/entities.rb
... | ... | @@ -6,6 +6,12 @@ module API |
6 | 6 | expose :is_admin?, as: :is_admin |
7 | 7 | expose :can_create_group?, as: :can_create_group |
8 | 8 | expose :can_create_project?, as: :can_create_project |
9 | + | |
10 | + expose :avatar_url do |user, options| | |
11 | + if user.avatar.present? | |
12 | + user.avatar.url | |
13 | + end | |
14 | + end | |
9 | 15 | end |
10 | 16 | |
11 | 17 | class UserSafe < Grape::Entity | ... | ... |