Show events from all projects on user page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
b6f3f62667
commit
7984e5b1ef
|
@ -11,7 +11,8 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
@groups = @user.groups.accessible_to(current_user)
|
||||
@events = @user.recent_events.where(project_id: @projects.pluck(:id)).limit(20)
|
||||
accessible_projects = @user.authorized_projects.accessible_to(current_user)
|
||||
@events = @user.recent_events.where(project_id: accessible_projects.pluck(:id)).limit(20)
|
||||
@title = @user.name
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue