myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [1948] branches/event_logging: Subscriptions.


From: noreply
Subject: [myexperiment-hackers] [1948] branches/event_logging: Subscriptions.
Date: Wed, 12 Nov 2008 12:45:35 -0500 (EST)

Revision
1948
Author
alekses6
Date
2008-11-12 12:45:34 -0500 (Wed, 12 Nov 2008)

Log Message

Subscriptions. Improved latest packs / files / workflows discovery for RSS feeds - eager loading of permissions is done now. Added new settings for these feeds in environment_private.rb

Modified Paths

Diff

Modified: branches/event_logging/app/controllers/blobs_controller.rb (1947 => 1948)


--- branches/event_logging/app/controllers/blobs_controller.rb	2008-11-12 15:49:01 UTC (rev 1947)
+++ branches/event_logging/app/controllers/blobs_controller.rb	2008-11-12 17:45:34 UTC (rev 1948)
@@ -301,7 +301,7 @@
   def find_blobs_rss
     # Only carry out if request is for RSS
     if params[:format] and params[:format].downcase == 'rss'
-      found = Blob.find(:all, :order => "blobs.updated_at DESC", :limit => 30, :include => [ { :contribution => :policy } ])
+      found = Blob.find(:all, :order => "blobs.updated_at DESC", :limit => LATEST_CONTRIBUTABLES_RSS_ENTRY_COUNT, :include => [ { :contribution => {:policy => :permissions} } ])
       
       @rss_blobs = []
       

Modified: branches/event_logging/app/controllers/packs_controller.rb (1947 => 1948)


--- branches/event_logging/app/controllers/packs_controller.rb	2008-11-12 15:49:01 UTC (rev 1947)
+++ branches/event_logging/app/controllers/packs_controller.rb	2008-11-12 17:45:34 UTC (rev 1948)
@@ -425,7 +425,7 @@
   def find_packs_rss
     # Only carry out if request is for RSS
     if params[:format] and params[:format].downcase == 'rss'
-      found = Pack.find(:all, :order => "packs.updated_at DESC", :limit => 30, :include => [ { :contribution => :policy } ])
+      found = Pack.find(:all, :order => "packs.updated_at DESC", :limit => LATEST_CONTRIBUTABLES_RSS_ENTRY_COUNT, :include => [ { :contribution => {:policy => :permissions} } ])
       
       @rss_packs = []
       

Modified: branches/event_logging/app/controllers/workflows_controller.rb (1947 => 1948)


--- branches/event_logging/app/controllers/workflows_controller.rb	2008-11-12 15:49:01 UTC (rev 1947)
+++ branches/event_logging/app/controllers/workflows_controller.rb	2008-11-12 17:45:34 UTC (rev 1948)
@@ -572,7 +572,7 @@
   def find_workflows_rss
     # Only carry out if request is for RSS
     if params[:format] and params[:format].downcase == 'rss'
-      found = Workflow.find(:all, :order => "workflows.updated_at DESC", :limit => 30, :include => [ { :contribution => :policy } ])
+      found = Workflow.find(:all, :order => "workflows.updated_at DESC", :limit => LATEST_CONTRIBUTABLES_RSS_ENTRY_COUNT, :include => [ { :contribution => {:policy => :permissions} } ])
       
       @rss_workflows = [ ]
       

Modified: branches/event_logging/config/environment_private.rb.pre (1947 => 1948)


--- branches/event_logging/config/environment_private.rb.pre	2008-11-12 15:49:01 UTC (rev 1947)
+++ branches/event_logging/config/environment_private.rb.pre	2008-11-12 17:45:34 UTC (rev 1948)
@@ -105,4 +105,10 @@
 DEFAULT_PUBLIC_NEWS_RSS_COUNT = 50
 DEFAULT_USER_HOME_PAGE_NEWS_COUNT = DEFAULT_NEWS_COUNT
 DEFAULT_USER_NEWS_COUNT = DEFAULT_NEWS_COUNT
-DEFAULT_GROUP_NEWS_COUNT = DEFAULT_NEWS_COUNT
\ No newline at end of file
+DEFAULT_GROUP_NEWS_COUNT = DEFAULT_NEWS_COUNT
+
+
+# =========== Settings for RSS feeds ===========
+
+# number of entries to show in "latest workflows|files|packs" feeds
+LATEST_CONTRIBUTABLES_RSS_ENTRY_COUNT = 30
\ No newline at end of file

reply via email to

[Prev in Thread] Current Thread [Next in Thread]