このコミットが含まれているのは:
2026-06-25 04:10:43 +09:00
コミット dbc654f346
10個のファイルの変更1117行の追加473行の削除
+7 -2
ファイルの表示
@@ -14,10 +14,15 @@ class MaterialsController < ApplicationController
tag_id = params[:tag_id].presence
parent_id = params[:parent_id].presence
unclassified = bool?(:unclassified)
q = Material.includes(:tag, :created_by_user, :material_export_items).with_attached_file
q = q.where(tag_id:) if tag_id
q = q.where(parent_id:) if parent_id
if unclassified
q = q.where(tag_id: nil)
else
q = q.where(tag_id:) if tag_id
q = q.where(parent_id:) if parent_id
end
count = q.count
materials = q.order(created_at: :desc, id: :desc).limit(limit).offset(offset)