base implementation
This commit is contained in:
parent
e0fb0703c4
commit
70690e1971
6 changed files with 59 additions and 5 deletions
7
app/controllers/users_controller.rb
Normal file
7
app/controllers/users_controller.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class UsersController < ApplicationController
|
||||
def show
|
||||
@user = User.find_by_username(params[:username])
|
||||
@projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id))
|
||||
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue