Class: Hubstats::QaSignoffsController

Inherits:
BaseController show all
Defined in:
app/controllers/hubstats/qa_signoffs_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#grouping

Instance Method Details

#indexObject

Public - Will list all of the QA Signoffs that belong to any specific user(s)

Returns - the QA Signoff data



9
10
11
12
13
14
15
16
17
# File 'app/controllers/hubstats/qa_signoffs_controller.rb', line 9

def index
  @qa_signoffs = Hubstats::QaSignoff.includes(:repo, :pull_request, :user)
    .belonging_to_users(params[:users])
    .belonging_to_repos(params[:repos])
    .group_by(params[:group])
    .paginate(:page => params[:page], :per_page => 15)

  grouping(params[:group], @qa_signoffs)
end

#showObject

Public - Will show the particular QA Signoff selected

Returns - the specific details of the QA Signoff



22
23
24
25
26
# File 'app/controllers/hubstats/qa_signoffs_controller.rb', line 22

def show
  @repo = Hubstats::Repo.where(id: params[:repo_id]).first
  @pull_request = Hubstats::PullRequest.where(id: params[:pull_request_id]).first
  @user = Hubstats::User.where(id: params[:user_id]).first
end