Class: WhoNeedsWP::RecentPosts
- Defined in:
- lib/who-needs-wp/sidebar/recentposts.rb
Overview
A sidebar component to display a list of recent posts
Instance Method Summary collapse
-
#render ⇒ Object
See Sidebar.render.
Methods inherited from Sidebar
Constructor Details
This class inherits a constructor from WhoNeedsWP::Sidebar
Instance Method Details
#render ⇒ Object
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 |