Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 02:50:28 +01:00
848a0dc0ca
Attempt to fix failing CI test that's working locally
17 Zeilen
Kein EOL
400 B
Ruby
17 Zeilen
Kein EOL
400 B
Ruby
module CustomWizardCustomFieldPreloader
|
|
def preload_custom_fields(objects, fields)
|
|
if objects.present?
|
|
@cw_klass = objects.first.class.name.underscore
|
|
if cw_fields.any?
|
|
cw_fields.each do |field|
|
|
fields << field.name
|
|
end
|
|
end
|
|
end
|
|
super(objects, fields)
|
|
end
|
|
|
|
def cw_fields
|
|
CustomWizard::CustomField.list_by(:klass, @cw_klass)
|
|
end
|
|
end |