From dc3cbaa0918c5194ae0f1e80024611c614be612f Mon Sep 17 00:00:00 2001 From: Joe Sak Date: Thu, 18 Nov 2010 10:52:10 -0600 Subject: Archive listing, views, helpers @page added to PostsController TODO: language file stuff -- I left comments in the view files where these belong. I don't know how to test them from here --- app/helpers/blog_posts_helper.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/helpers/blog_posts_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb new file mode 100644 index 0000000..fb90e94 --- /dev/null +++ b/app/helpers/blog_posts_helper.rb @@ -0,0 +1,22 @@ +module BlogPostsHelper + def blog_archive_list + posts = BlogPost.select('published_at').all_previous + return nil if posts.blank? + html = '

Archives

' + html.html_safe + end +end -- cgit v1.2.3