Skip to content

Commit

Permalink
Merge branch 'main' of github.com:avo-hq/docs.avohq.io
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Jan 17, 2025
2 parents cc62d4e + 14489f7 commit 904f5fd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/3.0/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ The `belongs_to` field will only work on the <Show /> and <Edit /> page of a rec
Read more on why [here](https://github.com/avo-hq/avo/issues/1572#issuecomment-1421461084).
:::

:::info
<VersionReq version="3.16.2" /> the `query` object is accessible within fields.
:::

```ruby
def fields
field :notify_user, as: :boolean
Expand Down Expand Up @@ -496,7 +500,14 @@ end

### Callable options

Both `name` and `message` (and since <Version version="3.14.4" /> `confirm_button_label` and `cancel_button_label`) allow a block. Within this block, you gain access to all attributes of [`Avo::ExecutionContext`](execution-context) along with the `record` (if on show view), `resource`, `arguments` and `view`.
The `name` and `message` options (and, as of <Version version="3.14.4" />, the `confirm_button_label` and `cancel_button_label` options) support the use of a block. Within this block, you gain access to all attributes of the [`Avo::ExecutionContext`](execution-context), as well as the following:

- `record` (if on the show view),
- `resource`
- `arguments`
- `view`
- `query` <VersionReq version="3.16.2" />

### Customize the name

```ruby
Expand Down

0 comments on commit 904f5fd

Please sign in to comment.