From 3535ef1c70048f734c4054b3c0d810a3521a4255 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Tue, 27 May 2025 01:50:31 +0900 Subject: [PATCH] =?UTF-8?q?#21=20=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/controllers/tags_controller.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/app/controllers/tags_controller.rb b/backend/app/controllers/tags_controller.rb index df78f7b..ee4fade 100644 --- a/backend/app/controllers/tags_controller.rb +++ b/backend/app/controllers/tags_controller.rb @@ -24,12 +24,11 @@ class TagsController < ApplicationController .group('tags.id') .order('post_count DESC, tags.name ASC') .limit(20)) - render json: tags.map do |tag| - { id: tag.id, + render json: tags.map { |tag| { + id: tag.id, name: tag.name, category: tag.category, - count: tag.post_count } - end + count: tag.post_count } } end def show