summaryrefslogtreecommitdiffstats
path: root/app/views/files/index.api.rsb
blob: 0a317e4751ca494ffe3769748463f8564e5f680c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
api.array :files do
  @containers.each do |container|
    container.attachments.each do |attachment|
      api.file do
        render_api_attachment_attributes(attachment, api)
        if container.is_a?(Version)
          api.version :id => container.id, :name => container.name
        end
        api.digest attachment.digest
        api.downloads attachment.downloads
      end
    end
  end
end