Merge pull request #13578 from gpanders/deprecated

Require deprecate_disable module in formulary
This commit is contained in:
Bo Anderson 2022-07-19 16:41:41 +01:00 committed by GitHub
commit 30fda551e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,6 +264,7 @@ module Formulary
end end
def self.convert_to_deprecate_disable_reason_string_or_symbol(string) def self.convert_to_deprecate_disable_reason_string_or_symbol(string)
require "deprecate_disable"
return string unless DeprecateDisable::DEPRECATE_DISABLE_REASONS.keys.map(&:to_s).include?(string) return string unless DeprecateDisable::DEPRECATE_DISABLE_REASONS.keys.map(&:to_s).include?(string)
string.to_sym string.to_sym