Files
bit/app/helpers/sessions_helper.rb
T
Juan Rodriguez 9c7146820c feat: Sessions controller
Sessions helper methods, login and signup modals, load partial views with stimulus

Situmuls usersController, Create and Destroy user sessions
2021-06-14 11:46:25 -05:00

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