aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2012-05-19 20:03:36 -0700
committerPhilip Arndt <parndt@gmail.com>2012-05-19 20:03:36 -0700
commit976b607ff564f08eb1c10cac6f1ab2a90b656cec (patch)
tree5770f26cf8547cf7b928a2064093c2e9188c96d5
parent0bb265521c5c70ad1ac378e9d7854902a0c4200d (diff)
parent4e8e71409950deb0823b4f384f9d1f323be07d8e (diff)
downloadrefinerycms-blog-976b607ff564f08eb1c10cac6f1ab2a90b656cec.tar.gz
refinerycms-blog-976b607ff564f08eb1c10cac6f1ab2a90b656cec.tar.bz2
refinerycms-blog-976b607ff564f08eb1c10cac6f1ab2a90b656cec.zip
Merge pull request #238 from GeekOnCoffee/fix_count
Adding Finder Method to utilize count
-rw-r--r--app/models/refinery/blog/category.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/refinery/blog/category.rb b/app/models/refinery/blog/category.rb
index 6deb5c5..2935c89 100644
--- a/app/models/refinery/blog/category.rb
+++ b/app/models/refinery/blog/category.rb
@@ -14,7 +14,7 @@ module Refinery
attr_accessible :title
def post_count
- posts.select(&:live?).count
+ posts.live.count
end
# how many items to show per page