index.atom.builder 685 Bytes
Newer Older
Nihad Abbasov's avatar
Nihad Abbasov committed
1 2 3
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
  xml.title   "#{@project.name} issues"
Douwe Maan's avatar
Douwe Maan committed
4
  xml.link    href: namespace_project_issues_url(@project.namespace, @project, format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
5
  xml.link    href: namespace_project_issues_url(@project.namespace, @project), rel: "alternate", type: "text/html"
Vinnie Okada's avatar
Vinnie Okada committed
6
  xml.id      namespace_project_issues_url(@project.namespace, @project)
Nihad Abbasov's avatar
Nihad Abbasov committed
7 8 9
  xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?

  @issues.each do |issue|
10
    issue_to_atom(xml, issue)
Nihad Abbasov's avatar
Nihad Abbasov committed
11 12
  end
end