#215 テスト・ケース追加

This commit is contained in:
2026-01-14 01:22:58 +09:00
parent ae9cba5fbe
commit 9e51fa7d34
5 changed files with 19 additions and 1 deletions
+5 -1
View File
@@ -26,7 +26,11 @@ class TagsController < ApplicationController
def show
tag = Tag.find_by(id: params[:id])
render json: tag.as_json(only: [:id, :category, :post_count], methods: [:name, :has_wiki])
if tag
render json: tag.as_json(only: [:id, :category, :post_count], methods: [:name, :has_wiki])
else
head :not_found
end
end
def show_by_name