aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/refinery/blog
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/refinery/blog')
-rw-r--r--app/models/refinery/blog/post.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index b078272..6a2d7c2 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -53,10 +53,15 @@ module Refinery
end
class << self
- def by_archive(date)
+ def by_month(date)
where(:published_at => date.beginning_of_month..date.end_of_month)
end
-
+
+ def by_archive(date)
+ Refinery.deprecate("Refinery::Blog::Post.by_archive(date)", {:replacement => "Refinery::Blog::Post.by_month(date)", :when => 2.2 })
+ by_month(date)
+ end
+
def by_year(date)
where(:published_at => date.beginning_of_year..date.end_of_year)
end