From 28b4c624b884c06ef74dc2e86695abaa6cc268c9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 14 Oct 2012 10:59:51 +0100 Subject: [PATCH 1/1] Use named routes in note RSS builder --- app/views/notes/_note.rss.builder | 4 ++-- config/routes.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/notes/_note.rss.builder b/app/views/notes/_note.rss.builder index 90d575725..bae719f5f 100644 --- a/app/views/notes/_note.rss.builder +++ b/app/views/notes/_note.rss.builder @@ -7,8 +7,8 @@ xml.item do xml.title t('note.rss.new', :place => note.nearby_place) end - xml.link url_for(:controller => "browse", :action => "note", :id => note.id, :only_path => false) - xml.guid url_for(:controller => "note", :action => "read", :id => note.id, :only_path => false) + xml.link browse_note_url(note) + xml.guid note_url(note) xml.description render(:partial => "description", :object => note, :formats => [ :html ]) xml.author note.author_name xml.pubDate note.updated_at.to_s(:rfc822) diff --git a/config/routes.rb b/config/routes.rb index 4c1c637d2..cec2c3e3f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -109,7 +109,7 @@ OpenStreetMap::Application.routes.draw do match '/browse/relation/:id' => 'browse#relation', :via => :get, :id => /\d+/ match '/browse/relation/:id/history' => 'browse#relation_history', :via => :get, :id => /\d+/ match '/browse/changeset/:id' => 'browse#changeset', :via => :get, :as => :changeset, :id => /\d+/ - match '/browse/note/:id' => 'browse#note', :via => :get, :id => /\d+/ + match '/browse/note/:id' => 'browse#note', :via => :get, :id => /\d+/, :as => "browse_note" match '/user/:display_name/edits' => 'changeset#list', :via => :get match '/user/:display_name/edits/feed' => 'changeset#feed', :via => :get, :format => :atom match '/user/:display_name/notes' => 'notes#mine', :via => :get -- 2.43.2