Sha256: 4cc7276fcd2a84b6cf9a70ec4891d476e70b6b39135e7e2f8c2480e0c468fd5a

Contents?: true

Size: 530 Bytes

Versions: 5

Compression:

Stored size: 530 Bytes

Contents

class Github::PullsController < ApplicationController

  def index
    @pulls = Github::PullRequest.open.order(created_at: :desc).preload(:project, :user)
    @labels = @pulls.flat_map(&:labels).uniq { |label| label["name"] }.sort_by { |label| label["name"] }
    @selected_labels = params.fetch(:only, "").split(/,\s*/)
    @selected_labels = @labels.map { |label| label["name"] } if @selected_labels.none?
    @selected_labels -= params.fetch(:except, "").split(/,\s*/)
    @title = "Pull Requests (#{@pulls.count})"
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
houston-core-0.7.0 app/controllers/github/pulls_controller.rb
houston-core-0.7.0.beta4 app/controllers/github/pulls_controller.rb
houston-core-0.7.0.beta3 app/controllers/github/pulls_controller.rb
houston-core-0.7.0.beta2 app/controllers/github/pulls_controller.rb
houston-core-0.7.0.beta app/controllers/github/pulls_controller.rb