Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Strings are Objects in ruby
Dieser Commit ist enthalten in:
Ursprung
759358e081
Commit
8fdd21601b
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -44,7 +44,7 @@ class CustomWizard::Mapper
|
||||||
|
|
||||||
def initialize(params)
|
def initialize(params)
|
||||||
@inputs = params[:inputs] || {}
|
@inputs = params[:inputs] || {}
|
||||||
@data = params[:data].with_indifferent_access || {}
|
@data = params[:data] ? params[:data].with_indifferent_access : {}
|
||||||
@user = params[:user]
|
@user = params[:user]
|
||||||
@opts = params[:opts] || {}
|
@opts = params[:opts] || {}
|
||||||
end
|
end
|
||||||
|
@ -269,7 +269,7 @@ class CustomWizard::Mapper
|
||||||
result = data[k]
|
result = data[k]
|
||||||
|
|
||||||
if keys.empty?
|
if keys.empty?
|
||||||
result.is_a?(Object) ? "" : result
|
result.is_a?(Hash) ? "" : result
|
||||||
else
|
else
|
||||||
self.recurse(result, keys)
|
self.recurse(result, keys)
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren