Merge commit '8e7c3973dc67835e0ce9c7073b9344ec19d3910a' into glitch-soc/merge-upstream
This commit is contained in:
commit
eebed16f59
151 files changed
+1519
-687
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class CollectionsController < BaseController
|
||||
before_action :set_account
|
||||
before_action :set_collection, only: :show
|
||||
|
||||
def show
|
||||
authorize @collection, :show?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_account
|
||||
@account = Account.find(params[:account_id])
|
||||
end
|
||||
|
||||
def set_collection
|
||||
@collection = @account.collections.includes(accepted_collection_items: :account).find(params[:id])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -50,7 +50,7 @@ module Admin
|
||||
private
|
||||
|
||||
def filtered_reports
|
||||
ReportFilter.new(filter_params).results.order(id: :desc).includes(:account, :target_account)
|
||||
ReportFilter.new(filter_params).results.order(id: :desc).includes(:account, :target_account, :collections)
|
||||
end
|
||||
|
||||
def filter_params
|
||||
@@ -58,7 +58,7 @@ module Admin
|
||||
end
|
||||
|
||||
def set_report
|
||||
@report = Report.find(params[:id])
|
||||
@report = Report.includes(collections: :accepted_collection_items).find(params[:id])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user