From 37817cc31d890f1e79b31ae3d625fbace672451e Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Thu, 20 Sep 2012 18:38:34 +0600 Subject: [PATCH] API: expose project id for milestones --- lib/api/entities.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 13a48e12..6241fc8f 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -36,7 +36,9 @@ module Gitlab end class Milestone < Grape::Entity - expose :id, :title, :description, :due_date, :closed, :updated_at, :created_at + expose :id + expose (:project_id) {|milestone| milestone.project.id} + expose :title, :description, :due_date, :closed, :updated_at, :created_at end class Issue < Grape::Entity