Created
May 21, 2009 21:28
-
-
Save brandon-beacher/115760 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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