index.atom.builder 599 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"
4
  xml.link    href: url_for(params), 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)
7
  xml.updated @issues.first.created_at.xmlschema if @issues.reorder(nil).any?
Nihad Abbasov's avatar
Nihad Abbasov committed
8

9
  xml << render(partial: 'issues/issue', collection: @issues) if @issues.reorder(nil).any?
Nihad Abbasov's avatar
Nihad Abbasov committed
10
end