I have a nested form for edit court. A court has many booking slots
<%= inputs_for f, :slots, fn p -> %> <%= label p, :hour, class: "control-label" %> <%= text_input p, :hour, class: "form-control" %> <%= error_tag p, :hour %> <% end %>
What i want is adding a if condition like that.
<%= if slot.weekday == 1 do%>
But i cant fetch values in :slots. How can i do that ?