diff --git a/docs/3.0/customization.md b/docs/3.0/customization.md index c954127e..1eec6896 100644 --- a/docs/3.0/customization.md +++ b/docs/3.0/customization.md @@ -499,3 +499,26 @@ end Related: - [Multitenancy](./multitenancy) - [`Avo::Current`](./avo-current#tenant_id) + +::::option `default_url_options` +`default_url_options` is a Rails [controller method](https://apidock.com/rails/ActionController/Base/default_url_options) that will append params automatically to the paths you generate through path helpers. + +In order to implement some features like route-level Multitenancy we exposed an API to add to Avo's `default_url_options` method. + +::: code-group +```ruby [config/initializers/avo.rb]{2} +Avo.configure do |config| + config.default_url_options = [:account_id] +end +``` +```ruby [app/config/routes.rb]{3} +Rails.application.routes.draw do + # Use to test out route-based multitenancy + scope "/account/:account_id" do + mount Avo::Engine, at: Avo.configuration.root_path + end +end +``` + +Now, when you visit `https://example.org/account/adrian/avo`, the `account_id` param is `adrian` and it will be appended to all path helpers. +:::: diff --git a/docs/3.0/upgrade.md b/docs/3.0/upgrade.md index bb4ab78c..7c015687 100644 --- a/docs/3.0/upgrade.md +++ b/docs/3.0/upgrade.md @@ -37,6 +37,10 @@ These links might be in Tools, Resource Tools, Menu Items, or regular view parti A quick search through your codebase should reveal them. ::: +## Upgrade from 3.3.0 to 3.4.0 + +Ruby 3.0 is end-of-life and we pushed some code that only works with Ruby 3.1. + ## Upgrade from 3.2.2 to 3.3.0 :::option `may_download_file` deprecated Actions now fully operate with turbo leading to the deprecation of `may_download_file` option. It can be safely removed from all actions.