about summary refs log tree commit diff stats
path: root/app/controllers
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 12:50:33 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 12:50:33 -0400
commit250ef8b5d4f6cb457c4976528f72f6ea7bf5f6cc (patch)
tree21dba266c2d0b6c39a7202fbaf119d6a0b7cecf0 /app/controllers
parent27482983496cd0b8b6fa7dc943a1b05959735835 (diff)
downloadthoughts-250ef8b5d4f6cb457c4976528f72f6ea7bf5f6cc.tar.gz
thoughts-250ef8b5d4f6cb457c4976528f72f6ea7bf5f6cc.tar.bz2
thoughts-250ef8b5d4f6cb457c4976528f72f6ea7bf5f6cc.zip
Tag cloud
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/tags_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index bceb3cf..355706b 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb
@@ -1,5 +1,9 @@
1class TagsController < ApplicationController 1class TagsController < ApplicationController
2 2
3 def index
4 @tags = Blog.tag_counts
5 end
6
3 def show 7 def show
4 @tag_name = params[:name] 8 @tag_name = params[:name]
5 @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) 9 @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10)