benhutton/resource_library — Issue #21: Category#groupings has terrible performance
Author: benhutton
Created: 2012-01-27 04:42:01+00:00
State: open

Need this issue to be resolved to fix it: https://github.com/mongoid/mongoid/issues/1441

The better way:
Category habtm Groupings (and probably GroupingTypes)
-> When a LibraryEntry is created, its groupings are added to its category
-> When a LibraryEntry is deleted, see if its category has another LibraryEntry with its grouping, and delete if not
-> When a LibraryEntry's groupings change, treat it as deleting and creating