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