Browse Source

#21 ちょっと修正

#23
みてるぞ 1 month ago
parent
commit
3535ef1c70
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      backend/app/controllers/tags_controller.rb

+ 3
- 4
backend/app/controllers/tags_controller.rb View File

@@ -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|
{ id: tag.id,
render json: tags.map { |tag| {
id: tag.id,
name: tag.name, name: tag.name,
category: tag.category, category: tag.category,
count: tag.post_count }
end
count: tag.post_count } }
end end


def show def show


Loading…
Cancel
Save