Skip to content

Commit

Permalink
Avo::App -> Avo::Current
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Dec 5, 2024
1 parent 148475c commit d9eaf28
Show file tree
Hide file tree
Showing 3 changed files with 4 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
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

0 comments on commit d9eaf28

Please sign in to comment.