Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMixin properties get deleted upon being mixed in, making reuse frustrating #110
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
lukekarrys
added
the
bug
label
Nov 26, 2014
added a commit
that referenced
this issue
Nov 26, 2014
latentflip
referenced this issue
Nov 26, 2014
Merged
Don’t delete properties from mixin objects passed to .extend #111
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Fixed in #111, released as 4.4.1 |
latentflip
closed this
Nov 26, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mmacaula commentedNov 26, 2014
Consider this code, requirebin example here
I'm guessing the reason State is
deleteing the definition is so that you don't have the definitions available as first-class properties on instantiated models. But I'm trying to make reusable mixins and use them across several types of State's and now I'm having to_.cloneor wrap them in a function. It would be nice if State did this for me.I would be happy to submit a PR with tests if you think I'm on the right track.