Skip to content

Heading

ruby
field :user_information, as: :heading
ruby
field :some_id, as: :heading, label: "user information"
ruby
field :some_id, as: :heading do
  "user information"
end
Heading field

The Heading field displays a header that acts as a separation layer between different sections.

Heading is not assigned to any column in the database and is only visible on the Show, Edit and Create views.

Computed heading

The computed fields are not rendered on form views, same with heading field, if computed syntax is used it will not be rendered on the form views. Use label in order to render it on all views.

Options

as_html

The `as_html` option will render it as HTML.
ruby
field :dev_heading, as: :heading, as_html: true do
  '<div class="underline uppercase font-bold">DEV</div>'
end

Default

false

Possible values

true, false

label

The content of `label` is the content displayed on the heading space.
ruby
field :some_id, as: :heading, label: "user information"