Adjust how deleted forums get shown
- In some cases deleted items weren't visible from the index view - There also shouldn't be any reason why they can't be shown when searched for specifically -- This also matches the behavior on comments
This commit is contained in:
@@ -65,6 +65,10 @@ class ForumPost < ApplicationRecord
|
||||
q = q.joins(:topic).where("forum_topics.category_id = ?", params[:topic_category_id].to_i)
|
||||
end
|
||||
|
||||
unless params[:is_deleted].present?
|
||||
q = q.active
|
||||
end
|
||||
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -80,6 +80,10 @@ class ForumTopic < ApplicationRecord
|
||||
q = q.apply_default_order(params)
|
||||
end
|
||||
|
||||
unless params[:is_deleted].present?
|
||||
q = q.active
|
||||
end
|
||||
|
||||
q
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user