From: Tom Hughes Date: Wed, 24 Apr 2013 18:17:13 +0000 (+0100) Subject: Fix exception with GPX and RSS notes#index when no notes are found X-Git-Tag: live~5059 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6e33cf087185c8b3a7831d5e8b70b0867487b5ea Fix exception with GPX and RSS notes#index when no notes are found --- diff --git a/app/views/notes/index.gpx.builder b/app/views/notes/index.gpx.builder index 7a3046027..5a7f34dbd 100644 --- a/app/views/notes/index.gpx.builder +++ b/app/views/notes/index.gpx.builder @@ -3,5 +3,5 @@ xml.instruct! xml.gpx("version" => "1.1", "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation" => "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd") do - xml << render(:partial => "note", :collection => @notes) + xml << (render(:partial => "note", :collection => @notes) || "") end diff --git a/app/views/notes/index.rss.builder b/app/views/notes/index.rss.builder index d6ee2bbad..53806f502 100644 --- a/app/views/notes/index.rss.builder +++ b/app/views/notes/index.rss.builder @@ -8,6 +8,6 @@ xml.rss("version" => "2.0", xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon ) xml.link url_for(:controller => "site", :action => "index", :only_path => false) - xml << render(:partial => "note", :collection => @notes) + xml << (render(:partial => "note", :collection => @notes) || "") end end