Skip to content

Commit

Permalink
Set homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
dngst committed Feb 16, 2024
1 parent d11ff23 commit 857ade7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

class HomeController < ApplicationController
def index
@home_page = true
if current_user&.admin?
redirect_to users_path
elsif current_user.present?
elsif current_user
redirect_to user_path(current_user)
else
@home_page = true
end
end
end

0 comments on commit 857ade7

Please sign in to comment.