app/models/spud_post.rb in spud_blog-0.8.5 vs app/models/spud_post.rb in spud_blog-0.8.6

- old
+ new

@@ -31,14 +31,14 @@ def self.recent_posts(limit=5) return where('visible = ? AND published_at <= ?', true, Time.now.utc).order('published_at desc').limit(limit) end def self.recent_blog_posts(limit=5) - return self.recent_posts.where(:is_news => false) + return self.recent_posts(limit).where(:is_news => false) end def self.recent_news_posts(limit=5) - return self.recent_posts.where(:is_news => true) + return self.recent_posts(limit).where(:is_news => true) end def self.from_archive(date_string) begin date = Date.strptime(date_string, "%Y-%b") \ No newline at end of file