mardi 18 août 2020

Rails nested category list (parent > child) using association

I hope all is well.

I have category in 3 levels. At the moment the association as check_box is giving me 1 level list so it is impossible to tell if I 'm selecting a level 3 item from which level 1.

  • Level 1
    • Level 2
      • Level 3

Is there a way to list my categories in Parent > Child type of grouped indentation?

Thank you

<%= f.association :categories, :include_blank => false, as: :check_boxes, label: false %>

enter image description here




Aucun commentaire:

Enregistrer un commentaire