Html tag inside Enum.each not printed

phoenix
troubleshooting

#1

view.html.eex :

<% Enum.each @account_types, fn(item) -> %>
    <option value="<%= item.key %>"><%= item.name %></option>
<% end %>

<%= IO.puts(@data) %> [output](http://pastecode.xyz/view/raw/9578ffc5](pastecode.xyz/view/raw/9578ffc5)

but option tag is not printed in html output


#2

Enum.each/2 doesn’t return anything, so there is nothing to be printed.

Use Enum.map/2 and change the <% to a <%=