summaryrefslogtreecommitdiff
path: root/app/controllers/labels_controller.rb
blob: 203bff56a71b38e0192ab91500fd429fdbf646b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class LabelsController < ProjectController
  before_filter :module_enabled

  # Allow read any issue
  before_filter :authorize_read_issue!

  respond_to :js, :html

  def index
    @labels = @project.issues.tag_counts_on(:labels).order('count DESC')
  end

  protected

  def module_enabled
    return render_404 unless @project.issues_enabled
  end
end