Skip to content

Textarea

The textarea field renders a <textarea /> element.

TIP

By default, the textarea field don't have a component for the Index view. For this reason, on the Index view the field is not even visible.

Follow the Generating a custom component for a field guide to add a component to the index view for this field.

ruby
field :body, as: :textarea

Options

rows

Set the number of rows visible in the Edit and New views.

ruby
field :body, as: :textarea, rows: 5

Default

5

Possible values

Any integer.