mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06: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
|