gitlab-org--gitlab-foss/app/controllers/users_controller.rb
2013-06-18 17:47:52 +03:00

11 lines
390 B
Ruby

class UsersController < ApplicationController
layout 'navless'
def show
@user = User.find_by_username!(params[:username])
@projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id)).order('namespace_id DESC')
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
@title = @user.name
end
end