gitlab-org--gitlab-foss/app/controllers/users_controller.rb
2014-01-19 23:39:56 +04:00

11 lines
368 B
Ruby

class UsersController < ApplicationController
layout 'navless'
def show
@user = User.find_by!(username: params[:username])
@projects = @user.authorized_projects.where(id: current_user.authorized_projects.pluck(:id)).includes(:namespace)
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
@title = @user.name
end
end