mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Cleanup todos from codebase (#30394)
This PR involves cleaning up the codebase from my (@keegangeorge's) todos. In particular: - Remove Form Template related todos (these are no longer in the roadmap) - Remove old left-over AI summarization related code after moving to AI (https://github.com/discourse/discourse-ai/pull/658) - Update one form template related spec
This commit is contained in:
@ -1,21 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# TODO(@keegan): Remove after removing SiteSetting.summarization_strategy
|
||||
|
||||
class SummarizationValidator
|
||||
def initialize(opts = {})
|
||||
@opts = opts
|
||||
end
|
||||
|
||||
def valid_value?(val)
|
||||
strategy = Summarization::Base.find_strategy(val)
|
||||
|
||||
return true unless strategy
|
||||
|
||||
strategy.correctly_configured?.tap { |is_valid| @strategy = strategy unless is_valid }
|
||||
end
|
||||
|
||||
def error_message
|
||||
@strategy.configuration_hint
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user