diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index c7f1d8c4..f8ab6382 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -175,6 +175,7 @@ const config = { {text: "Localization (I18n)", link: "/3.0/localization"}, {text: "Branding", link: "/3.0/branding"}, {text: "Routing", link: "/3.0/routing"}, + {text: "Multitenancy", link: "/3.0/multitenancy"}, ], }, { diff --git a/docs/3.0/avo-application-controller.md b/docs/3.0/avo-application-controller.md index bc28651e..2156fa56 100644 --- a/docs/3.0/avo-application-controller.md +++ b/docs/3.0/avo-application-controller.md @@ -1,5 +1,9 @@ # `Avo::ApplicationController` +:::tip +To safely extend Avo's `ApplicationController` please use the [`extend_controllers_with`](./customization#extend_controllers_with) configuration option. +::: + ## On extending the `ApplicationController` You may sometimes want to add functionality to Avo's `ApplicationController`. That functionality may be setting attributes to `Current` or multi-tenancy scenarios. @@ -63,3 +67,7 @@ With this technique, the `multitenancy_detector` method and its `before_action` :::info If you'd like to add a `before_action` before all of Avo's before actions, use `prepend_before_action` instead. That will run that code first and enable you to set an account or do something early on. ::: + +**Related:** + - [Multitenancy](./multitenancy) + - [`extend_controllers_with`](./customization#extend_controllers_with) diff --git a/docs/3.0/avo-current.md b/docs/3.0/avo-current.md index 0ae78d0c..aebbcd23 100644 --- a/docs/3.0/avo-current.md +++ b/docs/3.0/avo-current.md @@ -32,3 +32,15 @@ view_context.link_to "Avo", "https://avohq.io" The `locale` of the app. ::: +:::option `tenant_id` +You can set the `tenant_id` for the current request. +::: + +:::option `tenant` +You can set the `tenant` for the current request. +::: + +**Related:** + - [Multitenancy](./multitenancy) + - [`extend_controllers_with`](./customization#extend_controllers_with) + diff --git a/docs/3.0/common/file_other_common.md b/docs/3.0/common/file_other_common.md index 4f2cff03..36db39f3 100644 --- a/docs/3.0/common/file_other_common.md +++ b/docs/3.0/common/file_other_common.md @@ -4,7 +4,7 @@ Please ensure you have the `upload_{FIELD_ID}?`, `delete_{FIELD_ID}?`, and `download_{FIELD_ID}?` methods set on your model's **Pundit** policy. Otherwise, the input and download/delete buttons will be hidden. ::: -Related: +**Related:** - [Attachment pundit policies](./../authorization.html#attachments)