discourse/app/models/summarization_strategy.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
408 B
Ruby
Raw Permalink Normal View History

# 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