noosfero | Revert "acts-as-having-post: fetch feed with lazy loading"

Antonio Terceiro gitlab at gitlab.com
Wed Feb 25 12:11:00 BRT 2015


Antonio Terceiro 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/171be5c71dc2174d17c2cd5ca3930af1038092cc">171be5c7</a> by Antonio Terceiro
Revert "acts-as-having-post: fetch feed with lazy loading"

This reverts commit b22301ace52dfd7561900979a33ad07f7e195deb.

- - - - -


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
-    children.where(:type => 'RssFeed').limit(1)
+    Article.where(:parent_id => self.id).where(:type => 'RssFeed').first
   end
 
   def feed=(attrs)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150225/1ec18959/attachment.html>


More information about the Noosfero-dev mailing list