Add asset requiring for backwards compatibility
Dieser Commit ist enthalten in:
Ursprung
8083f44389
Commit
26749bd055
1 geänderte Dateien mit 14 neuen und 1 gelöschten Zeilen
|
@ -135,7 +135,20 @@ class CustomWizard::Field
|
||||||
@acbs ||= []
|
@acbs ||= []
|
||||||
end
|
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
|
if type
|
||||||
types[type.to_sym] ||= {}
|
types[type.to_sym] ||= {}
|
||||||
types[type.to_sym] = opts[:type_opts] if opts[:type_opts].present?
|
types[type.to_sym] = opts[:type_opts] if opts[:type_opts].present?
|
||||||
|
|
Laden …
In neuem Issue referenzieren