a11yist/app/controllers/home_controller.rb

32 lines
534 B
Ruby
Raw Permalink Normal View History

2024-07-15 14:31:54 +02:00
# frozen_string_literal: true
class HomeController < ApplicationController
allow_unauthenticated_access only: [ :show ]
2024-09-05 22:54:38 +02:00
def show
end
def profile
end
private
def initialize_sidebar_items
return [] unless action_name == "profile"
[
{
label: "Profil",
icon: :person,
path: profile_path,
active: action_name == "profile"
},
{
label: "Logout",
icon: :"box-arrow-right",
path: session_path,
method: :delete
}
]
2024-09-05 22:54:38 +02:00
end
end