【发布时间】:2017-07-01 04:47:39
【问题描述】:
我正在尝试从模板中的列表 (<%= @evento %>) 中提取值,但出现此错误:
lists in Phoenix.HTML and templates may only contain integers representing bytes, binaries or other lists, got invalid entry: %Skeleton.News.Evento{__meta__: #Ecto.Schema.Metadata<:loaded, "news_eventos">, date: "DEZ 2011", id: 69, imgPaths: ["images/fabasa/eventos/one/1.jpg", "images/fabasa/eventos/one/2.jpg", "images/fabasa/eventos/one/3.jpg", "images/fabasa/eventos/one/10.jpg"], inserted_at: ~N[2017-06-30 12:38:15.452214],...
那么,我的问题是如何将它转换为我仍然可以在我的模板中迭代的数据类型结构?
【问题讨论】: