Skip to content

Avo::Current

Avo::Current is based on the Current pattern Rails exposes using ActiveSupport/CurrentAttributes.

On each request Avo will set some values on it.

user

This is what will be returned by the current_user_method that you've set in your initializer.

params

Equivalent of request.params.

request

The Rails request.

context

The context that you configured in your initializer evaluated in Avo::ApplicationController.

view_context

An instance of ActionView::Rendering off of which you can run any methods or variables that are available in your partials.

ruby
view_context.link_to "Avo", "https://avohq.io"

locale

The locale of the app.

tenant_id

You can set the tenant_id for the current request.

tenant

You can set the tenant for the current request.

Related: