app/controllers/lists_controller.rb
# If list belongs to current_user, redirect to nested route, otherwise display list
If list belongs to current_user, redirect to nested route, otherwise display list
If list belongs to current_user redirect to nested route otherwise display list
def show
    if params[:id].to_i == current_user.id
      redirect_to user_dishes_path(current_user)
    else
      @list = List.find_by(id: params[:id])
    end
  end
def show if params [ :id ] . to_i == current_user . id redirect_to user_dishes_path ( current_user ) else @list = List . find_by ( id : params [ :id ] ) end end
If list belongs to current_user, redirect to nested route, otherwise display list
If list belongs to current_user redirect to nested route otherwise display list