nali 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 @[ through ] when model[ key ] is @
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 ]
@@ -1,5 +1,5 @@
1
1
  module Nali
2
2
 
3
- VERSION = '0.3.9'
3
+ VERSION = '0.4.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: