我正在尝试将布尔值传递给hidden_input。但是Postgrex似乎不理解我想传递的是什么。
下面是我的错误:
Postgrex expected a boolean, got "1". Please make sure the value you are passing matches the definition in your table or in your query or convert the value accordingly.表格:
<%= inputs_for f, :users_leagues, fn ff -> %>
<%= hidden_input ff, :commissioner, value: 1 %>
<%= hidden_input ff, :user_id, value: assigns.current_user.id %>
<%= hidden_input ff, :league_id, value: 1 %>
<% end %>如果只是传入true,它也不起作用,我会得到这个错误:Postgrex expected a boolean, got "value"
如何将布尔值传递给隐藏字段?
https://stackoverflow.com/questions/47707065
复制相似问题