aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/blog_posts_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb
index a74ec33..e690a51 100644
--- a/app/helpers/blog_posts_helper.rb
+++ b/app/helpers/blog_posts_helper.rb
@@ -4,10 +4,10 @@ module BlogPostsHelper
return nil if posts.blank?
html = '<section id="blog_archive_list"><h1>Archives</h1><nav>'
links = []
-
+
posts.each do |e|
links << e.published_at.strftime('%m/%Y')
- end
+ end
links.uniq!
links.each do |l|
year = l.split('/')[1]
@@ -19,7 +19,7 @@ module BlogPostsHelper
html += '</nav></section>'
html.html_safe
end
-
+
def next_or_previous?(post)
post.next.present? or post.prev.present?
end