I have this code in my HAML file with rails.
= find_and_preserve f.text_area :notes
It outputs
<textarea id="asdf_notes" name="asdf[notes]"></textarea>
How can I make this:
<textarea id="asdf_notes" name="asdf[notes]">SOME PLAIN TEXT</textarea>
?
It should be easy, but I spent about an hour and found nothing…
The textarea should take its contents from the model object linked with the form.
For example, if your form is:
You’d set
@customer.notes = "SOME PLAIN TEXT"where appropriate in your controller.