app/controllers/application_controller.rb
# Confirms a logged-in user
Confirms a logged-in user
Confirms a logged - in user
def logged_in_user
      unless logged_in?
        store_location
        flash[:danger] = "Please log in"
        redirect_to login_url
      end
    end
def logged_in_user unless logged_in? store_location flash [ :danger ] = "Please log in" redirect_to login_url end end
Confirms a logged-in user
Confirms a logged - in user