new action for intro page for new users
This commit is contained in:
11
app/presenters/intro_presenter.rb
Normal file
11
app/presenters/intro_presenter.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class IntroPresenter
|
||||
def popular_tags
|
||||
Tag.order("post_count desc").limit(8).map(&:name)
|
||||
end
|
||||
|
||||
def each
|
||||
popular_tags.each do |tag|
|
||||
yield(tag, PostSets::Post.new(tag, 1, 6))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user