partnerpedia/banyan — pull request #6 by saner (2011-12-30 21:18:23+00:00)
Title: Solving association duplicate categories and category groups

### Refrence
* Pivotal Tracker Stories
* [Do not associate duplicate categories](https://www.pivotaltracker.com/story/show/22645717)

### Notes
* Fixed `categories` attribute.
* Fixed `category_groups` attribute.
* Added specs.

The problem does not concern `banyan_categories_category_groups` table.

Problem with returning duplicate `categories` and `category_groups` attribute was solved by specifying `:uniq => true` for `had_many`. However this approach solves the problem on th ORM level.

It might be possible to overwrite `categories` attribute so that no duplicate records are stored in the database.