このコミットが含まれているのは:
2026-10-11 01:32:46 +09:00
コミット 02451e4caa
3個のファイルの変更、56行の追加、8行の削除
+7 -4
ファイルの表示
@@ -11,7 +11,8 @@ class WikiPagesController < ApplicationController
tag_groups = TagGroup.all
if title.present?
pattern = "%#{ ApplicationRecord.sanitize_sql_like(title) }%"
descriptions = descriptions.joins(tag: :tag_names)
descriptions =
descriptions.joins(tag: :tag_names)
.where(tag_names: { language_code: 'ja', primary_flg: true })
.where('tag_names.name LIKE ?', pattern).limit(20)
tag_groups = tag_groups.where(
@@ -55,9 +56,11 @@ class WikiPagesController < ApplicationController
return render_wiki_page_by_tag_description tag_description if tag_description
page = WikiPage.joins(:tag_name)
.includes(tag_name: :tag)
.find_by(tag_name: { name: title })
page =
WikiPage
.joins(:tag_name)
.includes(tag_name: :tag)
.find_by(tag_name: { name: title })
render_wiki_page_or_404 page
end