discourse/app/models/concerns/custom_field.rb
Daniel Waterworth d7a09fb08d
DEV: Add true_fields method for CustomFields (#24876)
This is useful for plugins that might otherwise rely on the
CUSTOM_FIELD_TRUE constant.
2023-12-14 11:06:21 -06:00

12 lines
204 B
Ruby

# frozen_string_literal: true
module CustomField
extend ActiveSupport::Concern
class_methods do
def true_fields
where(value: HasCustomFields::Helpers::CUSTOM_FIELD_TRUE)
end
end
end