app/controllers/list_items_controller.rb
# Update dish 'tasted' attribute to true
Update dish 'tasted' attribute to true
Update dish ' tasted ' attribute to true
def tasted
    if @list_item.try(:mark_as_tasted)
      redirect_to user_dishes_path(current_user), alert: "Hope that dish was tasty!"
    else
      redirect_to user_dishes_path(current_user), alert: "Dish could not be updated"
    end
  end
def tasted if @list_item . try ( :mark_as_tasted ) redirect_to user_dishes_path ( current_user ) , alert : "Hope that dish was tasty!" else redirect_to user_dishes_path ( current_user ) , alert : "Dish could not be updated" end end
Update dish 'tasted' attribute to true
Update dish ' tasted ' attribute to true