Rails text_area size

前端 未结 3 1773
清酒与你
清酒与你 2021-01-31 07:19

I have a text_area inside a fields_for, which is inside a form_for.

<%= day_form.text_area :hatch %>
3条回答
  •  天涯浪人
    2021-01-31 07:41

    You could either go with:

    <%= day_form.text_area :hatch, cols: "30", rows: "10" %>
    

    or you can specify both with the size attribute:

    <%= day_form.text_area :hatch, size: "30x10" %>
    

提交回复
热议问题