diff options
-rw-r--r-- | app/controllers/projects/starrers_controller.rb | 4 | ||||
-rw-r--r-- | app/views/shared/users/_user.html.haml | 12 |
2 files changed, 3 insertions, 13 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb index 5939a3885c6..cb230242e6e 100644 --- a/app/controllers/projects/starrers_controller.rb +++ b/app/controllers/projects/starrers_controller.rb @@ -13,7 +13,9 @@ class Projects::StarrersController < Projects::ApplicationController params[:has_starred] = @project @starrers = UsersFinder.new(current_user, params).execute - @starrers = @starrers.joins(:users_star_projects).select('"users".*, "users_star_projects"."created_at" as "starred_since"') + @starrers = @starrers.joins(:users_star_projects) + .select('"users".*, "users_star_projects"."created_at" as "starred_since"') + .where(users_star_projects: { project_id: @project.project_id }) @starrers = @starrers.sort_by_attribute(@sort) end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/views/shared/users/_user.html.haml b/app/views/shared/users/_user.html.haml deleted file mode 100644 index ae014176e54..00000000000 --- a/app/views/shared/users/_user.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -- user = local_assigns.fetch(:user) - -%li.member{ class: dom_class(user), id: dom_id(user) } - %span.list-item-name - = image_tag avatar_icon_for_user(user, 40), class: "avatar s40", alt: '' - .user-info - = link_to user.name, user_path(user), class: 'member js-user-link', data: { user_id: user.id } - %br - %span.cgray= user.to_reference - - - if user == current_user - %span.badge.badge-success.prepend-left-5= _("It's you") |