Add to label :id to response

This commit is contained in:
Alfredo Sumaran 2016-05-03 11:58:43 -05:00
parent f0c4f72735
commit faaab2aef8

View file

@ -1,6 +1,6 @@
class Dashboard::LabelsController < Dashboard::ApplicationController
def index
labels = Label.where(project_id: projects).select(:title, :color).uniq(:title)
labels = Label.where(project_id: projects).select(:id, :title, :color).uniq(:title)
respond_to do |format|
format.json { render json: labels }