class GroupsController

Public Instance Methods

issues() click to toggle source

Get only assigned issues

# File app/controllers/groups_controller.rb, line 26
def issues
  @user   = current_user
  @issues = current_user.assigned_issues.opened
  @issues = @issues.of_group(@group).recent.page(params[:page]).per(20)
  @issues = @issues.includes(:author, :project)

  respond_to do |format|
    format.html
    format.atom { render layout: false }
  end
end
merge_requests() click to toggle source

Get authored or assigned open merge requests

# File app/controllers/groups_controller.rb, line 20
def merge_requests
  @merge_requests = current_user.cared_merge_requests
  @merge_requests = @merge_requests.of_group(@group).recent.page(params[:page]).per(20)
end
people() click to toggle source
# File app/controllers/groups_controller.rb, line 46
def people
  @users = group.users.all
end
show() click to toggle source
# File app/controllers/groups_controller.rb, line 8
def show
  @events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0)
  @last_push = current_user.recent_push

  respond_to do |format|
    format.html
    format.js
    format.atom { render layout: false }
  end
end

Protected Instance Methods

group() click to toggle source
# File app/controllers/groups_controller.rb, line 52
def group
  @group ||= Group.find_by_code(params[:id])
end
project_ids() click to toggle source
# File app/controllers/groups_controller.rb, line 60
def project_ids
  projects.map(&:id)
end
projects() click to toggle source
# File app/controllers/groups_controller.rb, line 56
def projects
  @projects ||= current_user.projects_with_events.where(group_id: @group.id)
end