maccman/spine — pull request #139 by thedeeno (2011-11-16 09:49:30+00:00)
Title: Event Binding Duplication in Model Ctor

This is a fix for the following:

Event bindings are getting duplicated when added inside a model's constructor/init. I traced this back to the Model's create method where I found the model was being 'dup'd before added to Spine's internal records. This duping causes the model's constructor to run a second time behind the scenes, which can be confusing.

This patch includes tests for this issue as well as the small fix. Instead of duping, I just threw the source model into records. I'm not sure why duping was originally necessary, but this change didn't break any tests.

Thoughts?