0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 18:50:27 +01:00

Use name input for full_name if blank

Dieser Commit ist enthalten in:
Angus McLeod 2020-07-17 11:08:25 +10:00
Ursprung 1e4348b67a
Commit 978dc7c235

Datei anzeigen

@ -404,9 +404,19 @@ class CustomWizard::Action
members_visibility_level members_visibility_level
grant_trust_level grant_trust_level
).each do |attr| ).each do |attr|
if action[attr].present? input = action[attr]
if attr === "name" && input.blank?
raise ArgumentError.new
end
if attr === "full_name" && input.blank?
input = action["name"]
end
if input.present?
value = CustomWizard::Mapper.new( value = CustomWizard::Mapper.new(
inputs: action[attr], inputs: input,
data: data, data: data,
user: user user: user
).perform ).perform