mongoid_listable 0.0.4 → 0.0.5

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/mongoid/lists.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Mongoid
2
2
 
3
3
  # This module contains the core macro for defining listable has_many relationships
4
- # documents. They can be either embedded or referenced (relational).
4
+ #
5
5
  module Lists
6
6
 
7
7
  extend ActiveSupport::Concern
@@ -30,10 +30,6 @@ module Mongoid
30
30
  ids.each_with_index do |id, index|
31
31
  meta.klass.find(id).update_attribute field_name, index + 1
32
32
  end
33
-
34
- meta.klass.where(meta.foreign_key => id).not_in(id: ids).each do |obj|
35
- obj.update_attribute field_name, nil
36
- end
37
33
  end
38
34
 
39
35
  meta[:order] ||= "#{field_name} asc"
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'mongoid_listable'
7
- spec.version = '0.0.4'
7
+ spec.version = '0.0.5'
8
8
  spec.authors = [ 'richardcalahan' ]
9
9
  spec.email = [ 'richard@calahan.me' ]
10
10
  spec.description = ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_listable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: