Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created May 21, 2009 21:28
Show Gist options
  • Save brandon-beacher/115760 to your computer and use it in GitHub Desktop.
Save brandon-beacher/115760 to your computer and use it in GitHub Desktop.
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title Parish.root.name
xml.description "From around our community"
xml.link url_for(:format => :rss, :only_path => false, :params => params)
for news in @news
xml.item do
xml.author news.dfcfile.parish.primary_email
xml.title (("From: ") + news.dfcfile.parish.name + (" - ") + news.title)
xml.description strip_tags(news.start_story)
xml.pubDate news.story_date.to_time.rfc2822
xml.link url_for(:controller => "/dfc", :action => "newsdetail_2", :id => news.id, :only_path => false)
xml.guid url_for(:controller => "/dfc", :action => "newsdetail_2", :id => news.id, :only_path => false)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment