Class: Dashboard::LabelsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/dashboard/labels_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


2
3
4
5
6
7
8
# File 'app/controllers/dashboard/labels_controller.rb', line 2

def index
  labels = Label.where(project_id: projects).select(:title, :color).uniq(:title)

  respond_to do |format|
    format.json { render json: labels }
  end
end