summaryrefslogtreecommitdiffstats
path: root/app/views/projects/show.api.rsb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-20 14:55:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-20 14:55:44 +0000
commit30556f8cbfac04d5d6c6e3a9331874b7e83954d6 (patch)
tree5e5947d2058d374a6d59b5f225e8ef895a124039 /app/views/projects/show.api.rsb
parent95c172dab3a80a8c4c446979cf82b9a49fd8dabc (diff)
downloadredmine-30556f8cbfac04d5d6c6e3a9331874b7e83954d6.tar.gz
redmine-30556f8cbfac04d5d6c6e3a9331874b7e83954d6.zip
Makes issue categories available in project REST API (#9553).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7880 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects/show.api.rsb')
-rw-r--r--app/views/projects/show.api.rsb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/projects/show.api.rsb b/app/views/projects/show.api.rsb
index 3167e3f0a..a6f26f893 100644
--- a/app/views/projects/show.api.rsb
+++ b/app/views/projects/show.api.rsb
@@ -16,4 +16,10 @@ api.project do
api.tracker(:id => tracker.id, :name => tracker.name)
end
end if include_in_api_response?('trackers')
+
+ api.array :issue_categories do
+ @project.issue_categories.each do |category|
+ api.issue_category(:id => category.id, :name => category.name)
+ end
+ end if include_in_api_response?('issue_categories')
end