mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:22:20 +08:00
FEATURE: New API to apply custom filters to the review queue (#8392)
This commit is contained in:
@ -663,6 +663,15 @@ class Plugin::Instance
|
||||
File.exists?(js_file_path)
|
||||
end
|
||||
|
||||
# Receives an array with two elements:
|
||||
# 1. A symbol that represents the name of the value to filter.
|
||||
# 2. A Proc that takes the existing ActiveRecord::Relation and the value received from the front-end.
|
||||
def add_custom_reviewable_filter(filter)
|
||||
reloadable_patch do
|
||||
Reviewable.add_custom_filter(filter)
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def self.js_path
|
||||
|
Reference in New Issue
Block a user