Method: EffectivePostsHelper#recent_posts

Defined in:
app/helpers/effective_posts_helper.rb

#recent_posts(user: current_user, category: nil, limit: EffectivePosts.per_page) ⇒ Object

Recent Posts



105
106
107
108
# File 'app/helpers/effective_posts_helper.rb', line 105

def recent_posts(user: current_user, category: nil, limit: EffectivePosts.per_page)
  @recent_posts ||= {}
  @recent_posts[category] ||= Effective::Post.posts(user: user, category: category).limit(limit)
end