📜  ** Phoenix.HTML 和模板中的 (ArgumentError) 列表只能包含表示字节、二进制文件或其他列表的整数,输入无效:- Python 代码示例

📅  最后修改于: 2022-03-11 14:46:41.949000             🧑  作者: Mango

代码示例1
I was using content_tag(:input) and didn't give it space for the value spot.

Throws: ** (ArgumentError) lists in Phoenix.HTML and templates may only contain integers representing bytes, binaries or other lists, got invalid entry:
<%= content_tag :input, value: @item.quantity, type: "value", class: "input-xlarge", id: "orderQuantity" %>

works 
<%= content_tag :input, "", value: @item.quantity, type: "value", class: "input-xlarge", id: "orderQuantity" %>