Topic: Tagging & Categorization with tree structure
I'm organizing an app that contains many records of different train items. Each record can be categorized with a Category (scale), Sub_Category (type, ie locomotive ), Model, and Version. I'm using a tree structure to defined these four categorizations. I would also like to tag each individual record.
For tagging, I have done this in the Record model:
has_many tags :through => records_tags
I am, however, confused on the best way to do the tree structure categorization. I would like to be able to select a category, sub_category, model, or version and show all the records that fall in that selection. Then I would also like to be shown all the tags that correspond to those filtered records.
I am thinking that the current category (category, sub_category, model, or version) would have to be saved as a variable somewhere so that when a tag is clicked, it filters based on category and tag.
Here is the DB schema I have so far:
Thanks for any help or suggestions you might have.