Hey I have this code:
<div class="form-group">
<%= label f, :team_id, class: "control-label" %>
<%= select f, :team_id, @teams, class: "form-control" %>
<%= error_tag f, :team_id %>
</div>
which displays a dropdown from my items from the database
I get them like this:
teams =
Repo.all(Userteam1.Team)
|> Enum.map(&{&1.name, &1.id})
When i do not have team the dropdown is obviously empty, but when i have even one team i cannot select the dropdown to be empty. is there a way to do so?