Skip to content

Instantly share code, notes, and snippets.

@isterin
Created June 19, 2017 18:41
Show Gist options
  • Save isterin/38647cefcfa71519aae91cc8caa35ab4 to your computer and use it in GitHub Desktop.
Save isterin/38647cefcfa71519aae91cc8caa35ab4 to your computer and use it in GitHub Desktop.
<%= form_for @changeset, @action, fn f -> %>
<%= for {[id, name], ae} <- Enum.group_by(f.data.appentries, &([&1.sqmentry.sqmgroup.id, &1.sqmentry.sqmgroup.name])) do %>
<div>Group: <%= name %></div>
# Here I have to iterate the hierarchy
<%= inputs_for f, :appentries, fn e -> %>
<%= inputs_for e, :sqmentry, fn s -> %>
<%= inputs_for s, :sqmgroup, fn g -> %>
<div>
# input field goes here for (e, :status)
</div>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment