aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-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..3e3d85c 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)
+ warn "[Deprecation Warning] Refinery::Blog::Post.by_archive(date) has been replaced with by_month"
+ by_month(date)
+ end
+
def by_year(date)
where(:published_at => date.beginning_of_year..date.end_of_year)
end