From 250ef8b5d4f6cb457c4976528f72f6ea7bf5f6cc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 13 Oct 2023 12:50:33 -0400 Subject: Tag cloud --- app/controllers/tags_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers') 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 @@ class TagsController < ApplicationController + def index + @tags = Blog.tag_counts + end + def show @tag_name = params[:name] @blogs = Blog.tagged_with(params[:name]).where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) -- cgit 1.4.1