labels_controller.rb 458 Bytes
Newer Older
randx's avatar
randx committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class LabelsController < ApplicationController
  before_filter :project
  before_filter :module_enabled

  layout "project"

  # Authorize
  before_filter :add_project_abilities

  # Allow read any issue
  before_filter :authorize_read_issue!

  respond_to :js, :html

  def index
randx's avatar
randx committed
16
    @labels = @project.issues.tag_counts_on(:labels).order('count DESC')
randx's avatar
randx committed
17
18
19
20
21
22
23
24
  end

  protected

  def module_enabled
    return render_404 unless @project.issues_enabled
  end
end