How to handle asset groups within groups?

Hi Everyone,
I’m stumped. Imagine I have a bunch of assets. I want to be able to
them together (like in graphics programs), and then be able to group
into further groups.

What is the best way to do this?

  1. I could have two models, Asset and AssetGroup, where Asset has_a url,
    AssetGroup has_many Assets and has_many AssetGroups.

  2. I could have one model: Asset, which has_a url and has_many Assets,
    if it has a url it’s a “leaf” asset, and if it has some assets, it’s a
    “branch.” It could have a type field, too.

  3. Something else?

The reason this is difficult is because I want to have other models be
to contain either an Asset or an Asset group, and treat them as the
the same thing.

How would you go about doing this?


Thanks twice-over, Erol :slight_smile: I’ll look at those to see how they work