9c7146820c
Sessions helper methods, login and signup modals, load partial views with stimulus Situmuls usersController, Create and Destroy user sessions
12 lines
186 B
Ruby
12 lines
186 B
Ruby
# frozen_string_literal: true
|
|
|
|
module SessionsHelper
|
|
def logged_in?
|
|
!@current_user.nil?
|
|
end
|
|
|
|
def authenticate
|
|
@current_user = User.find_by(id: session[:user_id])
|
|
end
|
|
end
|