app/controllers/meals_controller.rb
# Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .
def form_object_params
      params.require(:meal).permit(:consumption_time,
                                   :new_ingredient,
                                   ingredients_attributes: %i(id
                                                              name
                                                              calories_integral
                                                              carbs_integral
                                                              proteins_integral
                                                              fat_integral
                                                              quantity_integral
                                                              calories_fractional
                                                              carbs_fractional
                                                              proteins_fractional
                                                              fat_fractional
                                                              quantity_fractional
                                                              commit
                                                              save_as_nutrient
                                                              _destroy))
    end
def form_object_params params . require ( :meal ) . permit ( :consumption_time , :new_ingredient , ingredients_attributes : %i( id name calories_integral carbs_integral proteins_integral fat_integral quantity_integral calories_fractional carbs_fractional proteins_fractional fat_fractional quantity_fractional commit save_as_nutrient _destroy ) ) end
Never trust parameters from the scary internet, only allow the white list through.
Never trust parameters from the scary internet only allow the white list through .