noosfero | 2 new commits pushed to repository

Rodrigo Souto gitlab at gitlab.com
Tue Feb 24 17:23:38 BRT 2015


Rodrigo Souto pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>

Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/b22301ace52dfd7561900979a33ad07f7e195deb">b22301ac</a> by Rodrigo Souto
acts-as-having-post: fetch feed with lazy loading

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/229c7c511a33b5fc1f0a6abef2895a9b339b5e1f">229c7c51</a> by Rodrigo Souto
Merge branch 'master' of gitlab.com:noosfero/noosfero

- - - - -


Changes:

=====================================
lib/acts_as_having_posts.rb
=====================================
--- a/lib/acts_as_having_posts.rb
+++ b/lib/acts_as_having_posts.rb
@@ -22,7 +22,7 @@ module ActsAsHavingPosts
   end
 
   def feed
-    Article.where(:parent_id => self.id).where(:type => 'RssFeed').first
+    children.where(:type => 'RssFeed').limit(1)
   end
 
   def feed=(attrs)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150224/8f8b4f0b/attachment.html>


More information about the Noosfero-dev mailing list