Sha256: 3747cdf82c1dde1f3d763c7a37318e96660c6e3ad7d1784bc1ddd88fdf16c2c1

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 KB

Contents

xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
	xml.channel do
		xml.title @elt.subject
		xml.link url_for(:only_path => false, :action => 'show', :id => @elt)
		xml.description @elt.subject

		Elt.find(:all,
			:conditions => "lft > #{@elt.lft} AND rgt < #{@elt.rgt}",
			:order => 'created_on DESC',
			:limit => LIST_LENGTH).each do |item|
			xml.item do
				xml.title item.subject
				#xml.category(@elt.subject)
				xml.pubDate item.created_on

				if url_for(:only_path => false).match(/http:\/\/echarp.dyndns.org/) and @elt.id == 'blog'
					xml.link(url_for(:only_path => false, :controller => 'perso',
						:action => 'blog', :id => item.id+'.html'))
					xml.comments(url_for(:only_path => false, :controller => 'perso',
						:action => 'blog', :id => item.id+'.html'))
				else
					xml.link(url_for(:only_path => false, :action => 'show', :id => item))
					xml.comments(url_for(:only_path => false, :action => 'show', :id => item))
				end

				xml.tag!("dc:creator", item.person.name) if item.person

				xml.description "<p>"+format(item.body)+"</p>"
			end
		end
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
parlement-0.10 app/views/elt/rss.rxml
parlement-0.11 app/views/elt/rss.rxml
parlement-0.12 app/views/elt/rss.rxml
parlement-0.13 app/views/elt/rss.rxml
parlement-0.14 app/views/elt/rss.rxml
parlement-0.9 app/views/elt/rss.rxml
parlement-0.8 app/views/elt/rss.rxml