Method: Decidim::AuthorizationFormBuilder#input
- Defined in:
- decidim-core/lib/decidim/authorization_form_builder.rb
#input(name, options = {}) ⇒ Object
Renders a single attribute from the form handlers.
name - The String name of the attribute. options - An optional Hash, accepted options are:
:as - A String name with the type the field to render
:input - An optional Hash to pass to the field method.
Returns a String.
27 28 29 30 31 32 33 34 |
# File 'decidim-core/lib/decidim/authorization_form_builder.rb', line 27 def input(name, = {}) if [:as] send([:as].to_s, name, [:input] || {}) else type = find_input_type(name.to_s) input_field(name, type) end end |