Sha256: cb2801ea1e4b39da583583da909446f286f53e5d91d998635aee72a3bca1d157

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

class Github::PullsController < ApplicationController

  def index
    @pulls = Github::PullRequest.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

4 entries across 4 versions & 1 rubygems

Version Path
houston-core-0.6.3 app/controllers/github/pulls_controller.rb
houston-core-0.6.2 app/controllers/github/pulls_controller.rb
houston-core-0.6.1 app/controllers/github/pulls_controller.rb
houston-core-0.6.0 app/controllers/github/pulls_controller.rb