app/controllers/drink_ingredients_controller.rb
def create
    @drink_ingredient = DrinkIngredient.new(drink_ingredient_params)

    if @drink_ingredient.save
      render json: @drink_ingredient, status: :created, location: @drink_ingredient
    else
      render json: @drink_ingredient.errors, status: :unprocessable_entity
    end
  end
# POST /drink_ingredients
# POST /drink_ingredients.json
# Only the user can make a Ingredient
POST /drink_ingredients
POST /drink_ingredients.json
Only the user can make a Ingredient
POST / drink_ingredients POST / drink_ingredients . json Only the user can make a Ingredient
def create
    @drink_ingredient = DrinkIngredient.new(drink_ingredient_params)
    if @drink_ingredient.save
      render json: @drink_ingredient, status: :created, location: @drink_ingredient
    else
      render json: @drink_ingredient.errors, status: :unprocessable_entity
    end
  end
def create @drink_ingredient = DrinkIngredient . new ( drink_ingredient_params ) if @drink_ingredient . save render json : @drink_ingredient , status : :created , location : @drink_ingredient else render json : @drink_ingredient . errors , status : :unprocessable_entity end end
POST /drink_ingredients
POST /drink_ingredients.json
Only the user can make a Ingredient
POST / drink_ingredients POST / drink_ingredients . json Only the user can make a Ingredient