0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-09 20:02:54 +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
grant_trust_level
).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(
inputs: action[attr],
inputs: input,
data: data,
user: user
).perform