early-leather-2501
03/31/2025, 10:25 AM12:09:19 web.1 | 2025-03-31 12:09:19 INFO Rendered layout /Users/michael/.rbenv/versions/3.4.2/lib/ruby/gems/3.4.0/gems/avo-3.18.2/app/views/layouts/avo/application.html.erb (Duration: 153.3ms | GC: 0.0ms)
12:09:19 web.1 | 2025-03-31 12:09:19 INFO Completed 500 Internal Server Error in 649ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms)
12:09:19 web.1 |
12:09:19 web.1 |
12:09:19 web.1 | 2025-03-31 12:09:19 ERROR
12:09:19 web.1 | ActionView::Template::Error (undefined method 'avo_dashboards' for an instance of #<Class:0x000000013ca379f0>)
12:09:19 web.1 | Caused by: NoMethodError (undefined method 'avo_dashboards' for an instance of #<Class:0x000000013ca379f0>)
12:09:19 web.1 |
12:09:19 web.1 | Information for: ActionView::Template::Error (undefined method 'avo_dashboards' for an instance of #<Class:0x000000013ca379f0>):
12:09:19 web.1 | 32: <%= render partial: "avo/partials/navbar", locals: { resource: @resource } %>
12:09:19 web.1 | 33: <div data-sidebar-target="mainArea" class="content-area flex-1 flex pt-16 relative <%= "sidebar-open" if @sidebar_open %>">
12:09:19 web.1 | 34: <div class="hidden lg:flex">
12:09:19 web.1 | 35: <%= render Avo::SidebarComponent.new sidebar_open: @sidebar_open %>
12:09:19 web.1 | 36: </div>
12:09:19 web.1 | 37: <div class="flex lg:hidden">
12:09:19 web.1 | 38: <%= render Avo::SidebarComponent.new sidebar_open: false, for_mobile: true %>
12:09:19 web.1 |
12:09:19 web.1 | railties (8.0.2) lib/rails/engine/lazy_route_set.rb:99:in 'method_missing'
12:09:19 web.1 | avo-menu (3.18.2) app/components/avo/sidebar/item_switcher_component.html.erb:8:in 'Avo::Sidebar::ItemSwitcherComponent#call'
12:09:19 web.1 | view_component (3.21.0) lib/view_component/compiler.rb:98early-leather-2501
03/31/2025, 10:26 AMearly-leather-2501
03/31/2025, 10:26 AM# config/routes/admin.rb
admin_constraint = ->(request) { request.env['warden'].authenticate? && request.env['warden'].user.admin? }
constraints admin_constraint do
admin_path = ENV.fetch('ADMIN_PATH') { '/_admin' }
mount Avo::Engine, at: Avo.configuration.root_path
scope module: 'admin', path: admin_path, as: :admin do
resources :users, only: [] do
resource :masquerade, only: [:show, :create]
end
end
end
scope module: 'admin', path: admin_path, as: :admin do
# logout doesn't have admin constraint
get 'masquerade/logout' => 'masquerades#destroy'
endloud-jewelry-99127
03/31/2025, 10:37 AMloud-jewelry-99127
03/31/2025, 10:38 AMloud-jewelry-99127
03/31/2025, 10:38 AMmount Avo::Engine, at: Avo.configuration.root_path with mount_avoearly-leather-2501
03/31/2025, 9:25 PM