Open lostie opened 7 years ago
When trying to define a html tag for an attribute which is specified as a string, e.g.:
builder.text_area 'my_form_field'
The following error occurs:
Failure/Error: output = builder.send method, 'name' NoMethodError: undefined method `find' for "name":String Shared Example Group: "input field" called from ./spec/lib/govuk_elements_form_builder/form_builder_spec.rb:272 # ./lib/govuk_elements_form_builder/form_builder.rb:197:in `form_group_classes' # ./lib/govuk_elements_form_builder/form_builder.rb:29:in `block (2 levels) in <class:FormBuilder>' # ./spec/lib/govuk_elements_form_builder/form_builder_spec.rb:39:in `block (3 levels) in <top (required)>'
This is raised here as a ruby String also responds to the method :count and the conversion to array is not done appropriately.
:count
When trying to define a html tag for an attribute which is specified as a string, e.g.:
The following error occurs:
This is raised here as a ruby String also responds to the method
:count
and the conversion to array is not done appropriately.