1
0
Fork 0
discourse-custom-wizard-unl.../lib/custom_wizard/field.rb
2020-03-31 15:53:00 +11:00

19 Zeilen
471 B
Ruby

class CustomWizard::Field
def self.types
@types ||= ['checkbox', 'composer', 'dropdown', 'tag', 'category', 'group', 'image', 'text', 'textarea', 'text-only', 'number', 'upload', 'user-selector', 'url']
end
def self.require_assets
@require_assets ||= {}
end
def self.add_assets(type, plugin = nil, asset_paths = [])
if type
types.push(*type)
end
if plugin && asset_paths
require_assets[plugin] = asset_paths
end
end
end