Allow a NestedModel's model attribute to be specified as a string or an object #107

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants

astjohn commented Aug 16, 2012

I struggled for a while trying to get NestedModels to work properly. The reason it wasn't working was because my parent model was declared before the nested one. This problem originated from the name of my source files and the fact that I'm using Rails' asset pipeline.

This change allows a model to be specified as a string so that model class declaration order is not important. It should be backwards compatible.

Unfortunately, I have not included tests.

@astjohn astjohn Make NestedModel model definitions independent of declaration order.
This allows nested models to be specified as a string so that declaration of model classes are independent of order.
e26a9fb
Owner

powmedia commented Oct 12, 2012

If you can add a test I'll merge this in

astjohn commented Oct 12, 2012

I'm pretty swamped at the moment, but I'll see what I can do.

Please add in NestedModel example that order of nested models declarations have to be above main model declaration. It took me bunch of time to figure out it.

reustle commented Feb 14, 2014

Are we still interested in merging this in (if it isn't too stale)? If so, I'll add a test so we can get it done.

@bryce-gibson bryce-gibson pushed a commit to bryce-gibson/backbone-forms that referenced this pull request Sep 3, 2015

@wyuenho wyuenho Closes #107. Triggers backgrid:next event on model for every attempt …
…to move with the intended indices and whether the attempt would go out of bound.
030c6c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment