a11yist/app/controllers/application_controller.rb
david 21ab02d647
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s
Links, mainly...
2024-07-26 00:59:00 +02:00

22 lines
789 B
Ruby

# frozen_string_literal: true
class ApplicationController < ActionController::Base
include Pagy::Backend
before_action :initialize_navbar
private
def initialize_navbar
@nav_path = controller_name
@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 }
]
@search_url = nil # root_url
end
end