20e4113791e6a9cff18f02d9046ec471ceacb7bb
[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).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