このコミットが含まれているのは:
2026-10-19 12:46:57 +09:00
コミット 4e656bad55
4個のファイルの変更、43行の追加、13行の削除
+16 -8
ファイルの表示
@@ -175,7 +175,8 @@ class TagsController < ApplicationController
tags_by_id =
Tag
.joins(:tag_names)
.includes(:tag_names, :materials, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.where(tag_names: { language_code: locale.language_code, primary_flg: true },
id: tag_ids)
.index_by(&:id)
@@ -238,7 +239,8 @@ class TagsController < ApplicationController
base =
Tag
.joins(:tag_names)
.includes(:tag_names, :materials, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.where(tag_names: { language_code: locale.language_code, primary_flg: true },
deprecated_at: nil)
base = base.where('tags.post_count > 0') if present_only
@@ -282,7 +284,8 @@ class TagsController < ApplicationController
tag =
Tag
.joins(:tag_names)
.includes(:tag_names, :materials, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(id: params[:id],
tag_names: { language_code: locale.language_code, primary_flg: true })
return render json: TagRepr.base(tag, language_code: locale.language_code) if tag
@@ -302,7 +305,8 @@ class TagsController < ApplicationController
tag =
Tag
.joins(:tag_names)
.includes(:tag_names, :materials, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(tag_names: { name:, language_code: locale.language_code, primary_flg: true })
return render json: TagRepr.base(tag, language_code: locale.language_code) if tag
@@ -320,7 +324,8 @@ class TagsController < ApplicationController
tag =
Tag.joins(:tag_names)
.includes(:tag_names, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(id: params[:id],
tag_names: { language_code: locale.language_code, primary_flg: true })
return head :not_found unless tag
@@ -340,7 +345,8 @@ class TagsController < ApplicationController
tag =
Tag
.joins(:tag_names)
.includes(:tag_names, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(tag_names: { name:, language_code: locale.language_code, primary_flg: true })
return head :not_found unless tag
@@ -359,7 +365,8 @@ class TagsController < ApplicationController
tag =
Tag
.joins(:tag_names)
.includes(:tag_names, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(id: params[:id],
tag_names: { language_code: locale.language_code, primary_flg: true })
return head :not_found unless tag
@@ -425,7 +432,8 @@ class TagsController < ApplicationController
tag =
Tag
.joins(:tag_names)
.includes(:tag_names, :materials, :tag_descriptions, parents: :tag_descriptions)
.preload(:tag_names, :materials, :deerjikists, :tag_descriptions,
parents: [:tag_names, :materials, :deerjikists, :tag_descriptions])
.find_by(tag_names: { name:, language_code: locale.language_code, primary_flg: true })
return head :not_found unless tag