mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 16:14:01 +08:00
19 lines
408 B
Ruby
19 lines
408 B
Ruby
# frozen_string_literal: true
|
|
|
|
# TODO(@keegan): Remove after removing SiteSetting.summarization_strategy
|
|
|
|
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
|