This commit is contained in:
2026-03-15 19:54:37 +09:00
parent e399707fbf
commit 0eab847ebb
2 changed files with 89 additions and 0 deletions
@@ -185,6 +185,7 @@ class PostsController < ApplicationController
def changes
id = params[:id].presence
tag_id = params[:tag].presence
page = (params[:page].presence || 1).to_i
limit = (params[:limit].presence || 20).to_i
@@ -195,6 +196,7 @@ class PostsController < ApplicationController
pts = PostTag.with_discarded
pts = pts.where(post_id: id) if id.present?
pts = pts.where(tag_id:) if tag_id.present?
pts = pts.includes(:post, :created_user, :deleted_user,
tag: { tag_name: :wiki_page })