aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/refinery/blog/categories_controller.rb
diff options
context:
space:
mode:
authorBrice Sanchez <bricesanchez@users.noreply.github.com>2016-06-01 11:57:17 -0400
committerBrice Sanchez <bricesanchez@users.noreply.github.com>2016-06-01 11:57:17 -0400
commit193317eaf6e01a26bdf97125f98fba95c9269275 (patch)
treef5b3c15cfeed2e3169467cac90c2a1cb33077ad0 /app/controllers/refinery/blog/categories_controller.rb
parent4926254e1762681f467c617a682c8c5f5bda328c (diff)
parentc4bdb2f86a55abfaf9a5917e39a39712e7e00153 (diff)
downloadrefinerycms-blog-193317eaf6e01a26bdf97125f98fba95c9269275.tar.gz
refinerycms-blog-193317eaf6e01a26bdf97125f98fba95c9269275.tar.bz2
refinerycms-blog-193317eaf6e01a26bdf97125f98fba95c9269275.zip
Merge pull request #441 from dougbradbury/master
Sort Tags and Categories by newest first
Diffstat (limited to 'app/controllers/refinery/blog/categories_controller.rb')
-rw-r--r--app/controllers/refinery/blog/categories_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/refinery/blog/categories_controller.rb b/app/controllers/refinery/blog/categories_controller.rb
index b5ab574..649bfe6 100644
--- a/app/controllers/refinery/blog/categories_controller.rb
+++ b/app/controllers/refinery/blog/categories_controller.rb
@@ -4,7 +4,7 @@ module Refinery
def show
@category = Refinery::Blog::Category.friendly.find(params[:id])
- @posts = @category.posts.live.includes(:comments, :categories).with_globalize.page(params[:page])
+ @posts = @category.posts.live.newest_first.uniq.includes(:comments, :categories).with_globalize.page(params[:page])
end
end