app/controllers/users_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_url
        flash[:danger] = "Please log in."
        redirect_to login_url
      end
    end
def logged_in_user unless logged_in? store_url flash [ :danger ] = "Please log in." redirect_to login_url end end
Confirms a logged-in user.
Confirms a logged - in user .