aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2014-12-12 14:58:37 +0100
committerHarald Eilertsen <haraldei@anduin.net>2014-12-12 14:58:37 +0100
commit96d8a23a35d91b195afe185327ffd51bb62e9bb3 (patch)
tree384a493bd195f599421624258872ca9a5a34052c /app
parent681bfd35a4914e86ec329dc682c0f4ea8379e689 (diff)
downloadhmnoweb-96d8a23a35d91b195afe185327ffd51bb62e9bb3.tar.gz
hmnoweb-96d8a23a35d91b195afe185327ffd51bb62e9bb3.tar.bz2
hmnoweb-96d8a23a35d91b195afe185327ffd51bb62e9bb3.zip
Display most popular tags if no recent tags.
Diffstat (limited to 'app')
-rw-r--r--app/decorators/controllers/refinery/pages_controller_decorator.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/decorators/controllers/refinery/pages_controller_decorator.rb b/app/decorators/controllers/refinery/pages_controller_decorator.rb
index 0d9a966..10accb0 100644
--- a/app/decorators/controllers/refinery/pages_controller_decorator.rb
+++ b/app/decorators/controllers/refinery/pages_controller_decorator.rb
@@ -42,5 +42,9 @@ ApplicationController.class_eval do
}
@tags = Refinery::Blog::Post.tag_counts_on(:tags, opts)
+ if @tags.empty?
+ opts.delete(:start_at)
+ @tags = Refinery::Blog::Post.tag_counts_on(:tags, opts)
+ end
end
end