Commit 545dc7e47d627a5ba4b4219880801f26fbb77f4d

Authored by Robert Speicher
1 parent 3ad931ca

Fix atom feed links

app/views/commits/_head.html.haml
@@ -19,5 +19,5 @@ @@ -19,5 +19,5 @@
19 - if current_page?(project_commits_path(@project)) && current_user.private_token 19 - if current_page?(project_commits_path(@project)) && current_user.private_token
20 %li.right 20 %li.right
21 %span.rss-icon 21 %span.rss-icon
22 - = link_to project_commits_path(@project, :atom, { private_token: current_user.private_token, ref: @ref }), title: "Feed" do 22 + = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
23 = image_tag "rss_ui.png", title: "feed" 23 = image_tag "rss_ui.png", title: "feed"
app/views/commits/show.atom.builder
1 xml.instruct! 1 xml.instruct!
2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do 2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
3 xml.title "Recent commits to #{@project.name}:#{@ref}" 3 xml.title "Recent commits to #{@project.name}:#{@ref}"
4 - xml.link :href => project_commits_url(@project, :atom, :ref => @ref), :rel => "self", :type => "application/atom+xml"  
5 - xml.link :href => project_commits_url(@project), :rel => "alternate", :type => "text/html" 4 + xml.link :href => project_commits_url(@project, @ref, format: :atom), :rel => "self", :type => "application/atom+xml"
  5 + xml.link :href => project_commits_url(@project, @ref), :rel => "alternate", :type => "text/html"
6 xml.id project_commits_url(@project) 6 xml.id project_commits_url(@project)
7 xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any? 7 xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any?
8 8
app/views/compare/_head.html.haml
@@ -19,5 +19,5 @@ @@ -19,5 +19,5 @@
19 - if current_page?(project_commits_path(@project)) && current_user.private_token 19 - if current_page?(project_commits_path(@project)) && current_user.private_token
20 %li.right 20 %li.right
21 %span.rss-icon 21 %span.rss-icon
22 - = link_to project_commits_path(@project, :atom, { private_token: current_user.private_token, ref: @ref }), title: "Feed" do 22 + = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
23 = image_tag "rss_ui.png", title: "feed" 23 = image_tag "rss_ui.png", title: "feed"