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 Dec 7, 2024
2 parents 94ac5c8 + d9eaf28 commit 933f57c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/3.0/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ end
It's recommended you don't store your current user here but using the [`current_user_method`](./authentication.html#customize-the-current-user-method) config.
:::

You can access the context data with `::Avo::App.context` object.
You can access the context data with `::Avo::Current.context` object.

## Eject
[This section has moved.](./eject-views)
Expand Down
3 changes: 3 additions & 0 deletions docs/3.0/dynamic-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,9 @@ dynamic_filter :first_name,
```

- Proc that returns an array of strings

<VersionReq version="3.15.1" /> when the filter is applied to an association, the `parent_record` becomes accessible within the `suggestions` block.

```ruby {6,12}
# Using field's filterable option
field :first_name,
Expand Down
2 changes: 1 addition & 1 deletion docs/3.0/native-field-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When you generate a new [resource tool](./resource-tools) you get access to the
# @resource.model
# form (on create & edit pages. please check for presence first)
# params
# Avo::App.context
# Avo::Current.context
# current_user
%>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/3.0/resource-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The partial is ready for you to customize further.
# @resource.model
# form (on create & edit pages. please check for presence first)
# params
# Avo::App.context
# Avo::Current.context
# current_user
%>
</div>
Expand All @@ -68,7 +68,7 @@ The partial is ready for you to customize further.

You might need access to a few things in the partial.

You have access to the `tool`, which is an instance of your tool `PostInfo`, and the `@resource`, which holds all the information about that particular resource (`view`, `model`, `params`, and others), the `params` of the request, the `Avo::App.context` and the `current_user`.
You have access to the `tool`, which is an instance of your tool `PostInfo`, and the `@resource`, which holds all the information about that particular resource (`view`, `model`, `params`, and others), the `params` of the request, the `Avo::Current.context` and the `current_user`.
That should give you all the necessary data to scope out the partial content.

## Tool visibility
Expand Down
31 changes: 31 additions & 0 deletions docs/3.0/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,34 @@ In this example:

</Option>

<Option name="`title`">

<VersionReq version="3.15.0" />

The `title` option enables you to specify a label for the entire group of tabs. This title serves as an overarching descriptor for the collection, providing context regarding the purpose or content of the tabs.

You can define the title of a tabs group by passing it as an argument to the `tabs` block. The value should be a string that succinctly encapsulates the theme or purpose of the tabs.

```ruby
tabs title: "Tabs group title" do
# ...
end
```

</Option>

<Option name="`description`">

<VersionReq version="3.15.0" />

The `description` option allows you to provide an auxiliary explanation or detailed note for the entire group of tabs. This can be used to elaborate on the purpose of the tabs or provide additional guidance.

You can define a description for a tabs group by passing it as an argument to the `tabs` block. The value should be a string that offers further clarity about the content or functionality of the tabs.

```ruby
tabs description: "Tabs group description" do
# ...
end
```

</Option>

0 comments on commit 933f57c

Please sign in to comment.