app/controllers/application_controller.rb
def admin_logout_required
    if logged_in_as_admin?
      flash[:notice] = 'Please log out of your admin account first!'
      redirect_to root_path
    end
  end
# Prevents admin from logging in as users
Prevents admin from logging in as users
Prevents admin from logging in as users
def admin_logout_required
    if logged_in_as_admin?
      flash[:notice] = 'Please log out of your admin account first!'
      redirect_to root_path
    end
  end
def admin_logout_required if logged_in_as_admin? flash [ :notice ] = 'Please log out of your admin account first!' redirect_to root_path end end
Prevents admin from logging in as users
Prevents admin from logging in as users