aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/refinery
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2012-02-10 00:38:21 -0800
committerPete Higgins <pete@peterhiggins.org>2012-02-10 01:06:05 -0800
commitaaf26e22d2feb03ebf4126e88406209239631a67 (patch)
tree600beb552164cd5c858fa57cba54dc9e838075fe /app/helpers/refinery
parent80187eac7d35a9a5ac67019a317e678c4445e44e (diff)
downloadrefinerycms-blog-aaf26e22d2feb03ebf4126e88406209239631a67.tar.gz
refinerycms-blog-aaf26e22d2feb03ebf4126e88406209239631a67.tar.bz2
refinerycms-blog-aaf26e22d2feb03ebf4126e88406209239631a67.zip
Refactor all_previous into published_dates_older_than.
Diffstat (limited to 'app/helpers/refinery')
-rw-r--r--app/helpers/refinery/blog/posts_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/refinery/blog/posts_helper.rb b/app/helpers/refinery/blog/posts_helper.rb
index 4653617..dfb742a 100644
--- a/app/helpers/refinery/blog/posts_helper.rb
+++ b/app/helpers/refinery/blog/posts_helper.rb
@@ -24,8 +24,8 @@ module Refinery
ArchiveWidget.new(dates, self).display
end
- def blog_archive_dates
- Refinery::Blog::Post.select('published_at').all_previous.map(&:published_at)
+ def blog_archive_dates(cutoff=Time.now.beginning_of_month)
+ Refinery::Blog::Post.published_dates_older_than(cutoff)
end
class ArchiveWidget