a11yist/app/controllers/application_controller.rb
david 63fc206c27
Some checks failed
/ Run tests (push) Successful in 8m56s
/ Run system tests (push) Failing after 1h0m48s
/ Build, push and deploy image (push) Successful in 7m47s
A lot :)
2024-09-05 22:54:38 +02:00

26 lines
927 B
Ruby

# frozen_string_literal: true
class ApplicationController < ActionController::Base
include Pagy::Backend
# allow_browser versions: :modern
before_action :initialize_navbar
private
def initialize_navbar
return unless request.get?
@navbar_items = [
{ label: "Dashboard", icon: :speedometer2, path: :root },
{ label: Report.model_name.human(count: 2), icon: :'journal-text', path: :reports },
{ label: Checklist.model_name.human(count: 2), icon: :'list-check', path: :checklists },
{ label: Check.model_name.human(count: 2), icon: :check2, path: :checks },
{ label: Link.model_name.human(count: 2), icon: :link, path: :links },
{ label: LinkCategory.model_name.human(count: 2), icon: :folder, path: :link_categories }
]
@nav_path = controller_name
@search_url = nil
end
end