Class RssController
In: test/functional/rss_controller_test.rb
app/controllers/rss_controller.rb
Parent: Object

Methods

Public Instance methods

author: RB

[Source]

    # File app/controllers/rss_controller.rb, line 57
57:   def any_uma_type_feed # processes the request for any uma element feed
58:     @wiki = Wiki.find_by_folder(params[:site_folder]) # gets the wiki site folder that is part of the requesting url
59:     @umaType = params[:uma_type] # gets the uma type that is part of the requesting url
60:     if (@wiki == nil) 
61:         render :action => 'error', :status => 404         
62:     else
63:       @wikiId = Wiki.find(@wiki.id) # finds the wiki site with the given id
64:       # queries for all the elements of given uma type in this particular wiki site
65:       @umaElements = WikiPage.find(:all, :conditions => ['uma_type=? and site_id=?', @umaType, @wiki.id])
66:     
67:       if (@umaElements.size == 0)
68:         render :action => 'error', :status => 404
69:       end  
70:     end
71:   end

[Source]

    # File app/controllers/rss_controller.rb, line 23
23:   def list
24:     @cadmin = User.find_central_admin
25:     @updates = Update.find(:all, :order => 'finished_on DESC', :conditions => ['finished_on > ?', Time.now - 14.days], :limit => 14)
26:     @uploads = Upload.find(:all, :order => 'created_on DESC', :conditions => ['created_on > ?', Time.now - 14.days], :limit => 14)
27:     unless params[:site_folder] == 'all' then
28:       @wiki = Wiki.find_by_folder(params[:site_folder])
29:       @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)
30:       @comments = Comment.find(:all, :order => 'created_on DESC', :conditions => ['site_id=? and created_on > ?', @wiki.id, Time.now - 14.days], :limit => 14)
31:     else
32:       @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)
33:       @comments = Comment.find(:all, :order => 'created_on DESC', :conditions => ['created_on > ?',Time.now - 14.days], :limit => 14)
34:     end if
35:     headers['Content-Type'] = 'application/rss+xml'
36:     render :layout => false
37:   end

author: RB

[Source]

    # File app/controllers/rss_controller.rb, line 40
40:   def practice_feed # processes the request for a practice feed
41:     @wiki = Wiki.find_by_folder(params[:site_folder]) # gets the wiki site folder that is part of the requesting url
42:     if (@wiki == nil) 
43:         render :action => 'error', :status => 404         
44:     else
45:       @practice_name = params[:practice_name] # gets the practice name that is part of the requestin url
46:       @wikiId = Wiki.find(@wiki.id) # finds the wiki site with the given id
47:       # queries for the practice page in this particular wiki site
48:       @practice = WikiPage.find(:first, :conditions => ['uma_name=? and site_id=?', @practice_name, @wiki.id])
49:       
50:       if (@practice == nil)
51:         render :action => 'error', :status => 404
52:       end  
53:     end
54:   end

[Source]

    # File test/functional/rss_controller_test.rb, line 20
20:                      def rescue_action(e) raise e end

[Validate]