このコミットが含まれているのは:
@@ -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)
|
||||
|
||||
新しい課題から参照
ユーザをブロックする