Sha256: 1c9027826d75232d8aad913d88f075031d0e8d2e6f59f806a3a2531a45f42879
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 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, :id => @elt) xml.description @elt.subject Elt.find(:all, :select => 'SUM(value), elts.id, parent_id, elts.created_on, parent_id,' \ +'elts_count, position, elts.person_id, subject, body, lft, rgt', :conditions => "lft > #{@elt.lft} AND rgt < #{@elt.rgt}", :order => 'SUM(value) IS NULL, SUM(value) DESC, created_on DESC', :group => 'elts.id, parent_id, elts.created_on, parent_id, elts_count,' \ +'position, elts.person_id, subject, body, lft, rgt', :limit => LIST_LENGTH, :joins => "LEFT JOIN choices ON elt_id = elts.id").each do |item| xml.item do xml.title item.subject #xml.category(@elt.subject) xml.vote item.result xml.pubDate item.created_on.strftime('%Y-%m-%d %H:%M:%S%z') xml.link(url_for(:only_path => false, :action => 'index', :id => item)) xml.comments(url_for(:only_path => false, :action => 'index', :id => item)) xml.tag!("dc:creator", item.person.name) if item.person xml.description "<p>"+format(item.body)+"</p>" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
parlement-0.17 | app/views/elt/vote_rss.rxml |