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

' html << t('blog.shared.archives') html << '

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