9e58fc8d8d5e4aaeeda1323b18c895256df7c5da
[leap_website.git] / app / helpers / blog_helper.rb
1 module BlogHelper
2
3   def recent_blog_summaries(path)
4     root = StaticPage.find(path)
5     if root
6       pages = root.all_children.order_by(:posted_at, :direction => :desc).limit(PAGINATION_SIZE)
7       haml do
8         pages.each do |page|
9           haml render(:partial => 'layouts/blog/summary', :locals => {:page => page})
10         end
11       end
12     end
13   end
14
15 end