#215 テスト・ケース追加
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user