gitlabhq/app/controllers/users_controller.rb

8 lines
318 B
Ruby
Raw Normal View History

2013-01-22 18:05:01 +01:00
class UsersController < ApplicationController
def show
2013-01-22 18:45:13 +01:00
@user = User.find_by_username!(params[:username])
2013-01-22 18:05:01 +01:00
@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