Closed jankeesvw closed 10 years ago
A few minutes ago I cloned this project to fix this issue, after trying to build a spec to reproduce it I found out that there was an error in my implementation. I was using the original form object and not the forms_for
form:
Simplified version that shows my mistake:
= nested_form_for @ride do |f|
= f.fields_for :legs do |leg_form|
.field
= f.label :start_point
= leg_form.text_field :start_point
This is an example of the outputted HTML, you can see the the
for
attribute for the<label>
does not match theid
of the<input>
. These should be the same so the user can click a label to enter a textfield. This also breaks some feature testing which relies on the same link.