Skip to content

description

Changes the text displayed under the association name.

An Avo has_many association titled User feedback with its description — Comments left by this user across the app. — highlighted below the panel title, showing the full index table with search and pagination.

Default value ​

nil

Possible values ​

Any string or any zero arity lambda function.

Within lambda, you have access to query and all attributes of Avo::ExecutionContext.

Evaluated on page load, even with loading: :manual

The description lambda is evaluated to render the association header — including the placeholder shown for a loading: :manual association. So a lambda that touches the database (e.g. -> { "#{query.count} posts" }) runs on every page load, before the user clicks Load. If you reached for loading: :manual to defer that query, keep the description cheap (or omit it) — only the framed content is fetched on demand.