fix
This commit is contained in:
parent
21eb842766
commit
da6931d790
|
@ -408,7 +408,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
def projects
|
def projects
|
||||||
is_current_admin_user = User.current.logged? && (current_user&.admin? || current_user.id == @user.id)
|
is_current_admin_user = User.current.logged? && (current_user&.admin? || current_user.id == @user.id)
|
||||||
scope = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
|
scope, @home_top_ids = Projects::ListMyQuery.call(params, @user,is_current_admin_user)
|
||||||
@total_count = scope.size
|
@total_count = scope.size
|
||||||
@projects = kaminari_unlimit_paginate(scope)
|
@projects = kaminari_unlimit_paginate(scope)
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,5 +83,7 @@ class Projects::ListMyQuery < ApplicationQuery
|
||||||
scope.distinct.order("projects.#{sort} #{sort_direction}")
|
scope.distinct.order("projects.#{sort} #{sort_direction}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return scope, @home_top_ids
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue