#21 ちょっと修正
This commit is contained in:
@@ -24,12 +24,11 @@ class TagsController < ApplicationController
|
|||||||
.group('tags.id')
|
.group('tags.id')
|
||||||
.order('post_count DESC, tags.name ASC')
|
.order('post_count DESC, tags.name ASC')
|
||||||
.limit(20))
|
.limit(20))
|
||||||
render json: tags.map do |tag|
|
render json: tags.map { |tag| {
|
||||||
{ id: tag.id,
|
id: tag.id,
|
||||||
name: tag.name,
|
name: tag.name,
|
||||||
category: tag.category,
|
category: tag.category,
|
||||||
count: tag.post_count }
|
count: tag.post_count } }
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
Reference in New Issue
Block a user