From 9b03ac9a7c71657dc39d6976672c882cdb6c0d18 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Mon, 22 Sep 2014 11:02:45 +0200 Subject: [PATCH] Do not fail over missing user, when building rss feed. --- lib/foodsoft_wiki/app/views/pages/all.rss.builder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/foodsoft_wiki/app/views/pages/all.rss.builder b/lib/foodsoft_wiki/app/views/pages/all.rss.builder index 35581c72..f7194763 100644 --- a/lib/foodsoft_wiki/app/views/pages/all.rss.builder +++ b/lib/foodsoft_wiki/app/views/pages/all.rss.builder @@ -1,4 +1,4 @@ -xml.instruct! :xml, :version => "1.0" +xml.instruct! :xml, :version => "1.0" xml.rss :version => "2.0" do xml.channel do xml.title FoodsoftConfig[:name] + " Wiki" @@ -9,11 +9,11 @@ xml.rss :version => "2.0" do xml.item do xml.title page.title xml.description page.diff, :type => "html" - xml.author User.find(page.updated_by).display + xml.author User.find_by_id(page.updated_by).try(:display) xml.pubDate page.updated_at.to_s(:rfc822) xml.link wiki_page_path(page.permalink) xml.guid page.updated_at.to_i end end end -end \ No newline at end of file +end