Use the custom namespace to find the custom input.
In previous ruby versions(1.9.3) we can not use `Object.get_const('CustomNamespace::MyInput')`, the correct way is `CustomNamespace.get('MyInput')`.
This commit is contained in:
parent
5ae526ed3c
commit
7dd567ca8c
|
@ -623,9 +623,7 @@ module SimpleForm
|
|||
|
||||
def attempt_mapping_with_custom_namespace(input_name)
|
||||
SimpleForm.custom_inputs_namespaces.each do |namespace|
|
||||
camelized = [namespace, input_name].join("::")
|
||||
|
||||
if (mapping = attempt_mapping(camelized, Object))
|
||||
if (mapping = attempt_mapping(input_name, namespace.constantize))
|
||||
return mapping
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue