Commit d1af87fe by Đường Sỹ Hoàng

Removed space in line 9

parent 43278a70
...@@ -6,13 +6,13 @@ module SessionsHelper ...@@ -6,13 +6,13 @@ module SessionsHelper
# Returns the current logged-in user (if any) # Returns the current logged-in user (if any)
def current_user def current_user
if session[:user_id] if session[:user_id]
@current_user ||= User.find_by( id: session[:user_id]) @current_user ||= User.find_by(id: session[:user_id])
end end
end end
# Return true if the user is logged in, false otherwise . # Return true if the user is logged in, false otherwise .
def logged_in? def logged_in?
current_user.present? current_user.present?
end end
# Logs out the current user # Logs out the current user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment