Class | RssController
In: | app/controllers/rss_controller.rb
Parent: | ApplicationController

Copyright (c) 2006 Logica

### Methods

list

### Public Instance methods

list()

[Source]

        # File app/controllers/rss_controller.rb, line 21
    21:   def list
    22:     @cadmin = User.find_central_admin
    23:     @updates = Update.find(:all, :order => 'finished_on DESC', :conditions => ['finished_on > ?', Time.now - 14.days], :limit => 14)
    24:     @uploads = Upload.find(:all, :order => 'created_on DESC', :conditions => ['created_on > ?', Time.now - 14.days], :limit => 14)
    25:     unless params[:site_folder] == 'all' then
    26:       @wiki = Wiki.find_by_folder(params[:site_folder])
    27:       @versions = Version.find(:all, :order => 'created_on DESC', :conditions => ['wiki_id=? and baseline_process_id is null and created_on > ? and not exists (select * from checkouts c where c.version_id=versions.id)', @wiki.id, Time.now - 14.days ], :limit => 14)
    28:       @comments = Comment.find(:all, :order => 'created_on DESC', :conditions => ['site_id=? and created_on > ?', @wiki.id, Time.now - 14.days], :limit => 14)
    29:     else
    30:       @versions = Version.find(:all, :order => 'created_on DESC', :conditions => ['baseline_process_id is null and created_on > ? and not exists (select * from checkouts c where c.version_id=versions.id)',Time.now - 14.days], :limit => 14)
    31:       @comments = Comment.find(:all, :order => 'created_on DESC', :conditions => ['created_on > ?',Time.now - 14.days], :limit => 14)
    32:     end if
    33:     headers['Content-Type'] = 'application/rss+xml'
    34:     render :layout => false
    35:   end

[Validate]