mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 02:06:18 +08:00
17 lines
333 B
Ruby
17 lines
333 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
require "enum_site_setting"
|
||
|
|
||
|
class SummarizationStrategy < EnumSiteSetting
|
||
|
def self.valid_value?(val)
|
||
|
true
|
||
|
end
|
||
|
|
||
|
def self.values
|
||
|
@values ||=
|
||
|
Summarization::Base.available_strategies.map do |strategy|
|
||
|
{ name: strategy.display_name, value: strategy.model }
|
||
|
end
|
||
|
end
|
||
|
end
|