diff --git a/lib/custom_wizard/field.rb b/lib/custom_wizard/field.rb index ee0fc379..a4358296 100644 --- a/lib/custom_wizard/field.rb +++ b/lib/custom_wizard/field.rb @@ -135,7 +135,20 @@ class CustomWizard::Field @acbs ||= [] end - def self.register(type, plugin = nil, opts = {}) + def self.require_assets + Rails.logger.warn("Custom Wizard field regisration no longer requires asset registration. Support will be removed in v2.1.0.") + + @require_assets ||= {} + end + + def self.register(type, plugin = nil, opts = {}, legacy_opts = {}) + if opts.is_a?(Array) + Rails.logger.warn("Custom Wizard field regisration no longer requires asset registration. Support will be removed in v2.1.0.") + + require_assets[plugin] = opts + opts = legacy_opts + end + if type types[type.to_sym] ||= {} types[type.to_sym] = opts[:type_opts] if opts[:type_opts].present?