I have some orders with nested items and the items have nested kinds. When i do a form_for @order
in a view, then i would like to hide all the items that have their :registered
attribute set to true
<% form_for @order do |f| %>
<% f.fields_for :items do |ff| %>
<%# show all the items that have :registered == false %>
<% end %>
<% end %>
or
def register
@order = Order.find(params[:id])
# Sort out the :registered == true
end