module BlogPostsHelper def blog_archive_list posts = BlogPost.select('published_at').all_previous return nil if posts.blank? html = '

Archives

' html.html_safe end def next_or_previous?(post) post.next.present? or post.prev.present? end end