Build <textarea>
with text_area
helper
This commit refactors the View layer’s notes#new
template by replacing
a hard-coded <textarea>
element with an invocation to
text_area
.
First, we modify the form_with
call to yield a FormBuilder
instance
to the block.
Next, we invoke FormBuilder#text_area
and pass :content
as the first
argument. This constructs a <textarea>
element with
id="content"
and name="content"
. Since our previous
commits depended on both the id
and name
attributes’ presence, it’s
helpful to emphasize that the FromBuilder#text_area
will generate the
necessary HTML.
When we run the test again, it is still passing.