app/helpers/sessions_helper.rb
# Logs in the given user.
Logs in the given user.
Logs in the given user .
def log_in(user)
    session[:user_id] = user.id
    if user.type == "Admin"
      session[:user_role] = :admin
    elsif user.type == "Partner"
      session[:user_role] = :partner
    elsif user.type == "Staff"
      session[:user_role] = :staff
    end
  end
def log_in ( user ) session [ :user_id ] = user . id if user . type == "Admin" session [ :user_role ] = :admin elsif user . type == "Partner" session [ :user_role ] = :partner elsif user . type == "Staff" session [ :user_role ] = :staff end end
Logs in the given user.
Logs in the given user .
user
<not_specific>