Class: WhoNeedsWP::RecentPosts

Inherits:
Sidebar
  • Object
show all
Defined in:
lib/who-needs-wp/sidebar/recentposts.rb

Overview

A sidebar component to display a list of recent posts

Instance Method Summary collapse

Methods inherited from Sidebar

#initialize, render_all

Constructor Details

This class inherits a constructor from WhoNeedsWP::Sidebar

Instance Method Details

#renderObject

See Sidebar.render



5
6
7
# File 'lib/who-needs-wp/sidebar/recentposts.rb', line 5

def render
  WhoNeedsWP::render_template("recentposts", { :posts => WhoNeedsWP::Post.all[0..5] })
end