flatiron/resourceful — pull request #16 by slaskis (2011-11-15 14:27:30+00:00)
Title: Added a test for self-nested relationships.

Added a Category which relates back to itself.

It passes the tests besides the error caused by #15 (which when fixed all tests pass).

It also has two FIXMEs:

* The pluralize method is a bit weak, so _category_ turns into _categorys_ instead of expected _categories_. I was thinking maybe [this project](https://github.com/MSNexploder/inflect) might come handy?

* I can't `this.parent('category')` in the function passed to `resourceful.define` because the resource is not registered with resourceful until after the define function. Maybe a simple `name == resource` check would do in relationships to allow this? Or `resourceful.register()` could be called earlier?