# In the example below I'm grabbing and printing the Parent ID value for a category inside a Check Box Collection field. <%= f.collection_check_boxes :category_ids, list_artwork_categories_by_type(@artwork.artwork_type_id), :id, :name do |b| %> <% p b.object.parent_id %>
<%= b.check_box(class: "checkbox") %> <%= b.label %>
<% end %>