nali 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/client/javascripts/nali/model.js.coffee +2 -1
- data/lib/nali/version.rb +1 -1
- metadata +1 -1
|
@@ -319,8 +319,9 @@ Nali.extend Model:
|
|
|
319
319
|
# связанных с текущей через модель through
|
|
320
320
|
@getter name, =>
|
|
321
321
|
delete @[ name ]
|
|
322
|
+
list = @[ through ]
|
|
322
323
|
@[ name ] = model.where correct: ->
|
|
323
|
-
return true for model in
|
|
324
|
+
return true for model in list when model[ key ] is @
|
|
324
325
|
false
|
|
325
326
|
@[ name ].subscribeTo @[ through ], 'update.length.add', ( model ) -> @add model[ key ]
|
|
326
327
|
@[ name ].subscribeTo @[ through ], 'update.length.remove', ( model ) -> @remove model[ key ]
|
data/lib/nali/version.rb
CHANGED