Module: FormsHelper
- Defined in:
- app/helpers/forms_helper.rb
Instance Method Summary collapse
Instance Method Details
#field_type(field) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/forms_helper.rb', line 7 def field_type(field) field_type = field._type.gsub(/^.*::/, '').downcase if field_type == "textfield" && field.rows > 1 field_type = "textarea" end return field_type end |
#response_setup(form) ⇒ Object
3 4 5 |
# File 'app/helpers/forms_helper.rb', line 3 def response_setup(form) form.responses.build end |