summaryrefslogtreecommitdiffstats
path: root/app/views/issues/show.api.rsb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-18 20:53:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-18 20:53:10 +0000
commitf89483a206b4aea3a307000c5ed7c0e9da5bea93 (patch)
tree060d0e9b017fb58474b1c4bd5c8c5554ef5578a3 /app/views/issues/show.api.rsb
parente10198f0d5f3f0b7ba2f95a1fa1ae16abe89fb0d (diff)
downloadredmine-f89483a206b4aea3a307000c5ed7c0e9da5bea93.tar.gz
redmine-f89483a206b4aea3a307000c5ed7c0e9da5bea93.zip
REST API for reading attachments (#7671).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6295 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issues/show.api.rsb')
-rw-r--r--app/views/issues/show.api.rsb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/issues/show.api.rsb b/app/views/issues/show.api.rsb
index 9d98959a9..ccc3e8767 100644
--- a/app/views/issues/show.api.rsb
+++ b/app/views/issues/show.api.rsb
@@ -25,6 +25,12 @@ api.issue do
render_api_issue_children(@issue, api) if include_in_api_response?('children')
+ api.array :attachments do
+ @issue.attachments.each do |attachment|
+ render_api_attachment(attachment, api)
+ end
+ end if include_in_api_response?('attachments')
+
api.array :relations do
@relations.each do |relation|
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay)