Skip to content

Run Avo on the root path

You might want to run avo on the root path on your app. We've seen plenty of users use this strategy.

This is as simple as changing the root_path from the avo.rb initializer to /.

Avo.configure do |config|
  # other pieces of configuration

  # Change the path to `/` to make it the root path
  config.root_path = '/'

I used these commands to create a new repo and change the path.

rails new avo-root-path
cd avo-root-path
bin/rails app:template LOCATION=''
sed -i '' "s|config.root_path = '/avo'|config.root_path = '/'|" config/initializers/avo.rb