ex04/acme/app/controllers/products_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 product_params
    params.require(:product).permit(:name, :description, :brand_id, :brand,
                                    :pict, :pict_cache,
                                    :price,
                                    brand_attributes: %i[name avatar avatar_cache])
  end
def product_params params . require ( :product ) . permit ( :name , :description , :brand_id , :brand , :pict , :pict_cache , :price , brand_attributes : %i[ name avatar avatar_cache ] ) 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 .