acts_as_sourceable 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'acts_as_sourceable'
3
- s.version = '1.0.4'
3
+ s.version = '1.0.5'
4
4
  s.date = %q{2010-09-16}
5
5
  s.email = 'technical@rrnpilot.org'
6
6
  s.homepage = 'http://github.com/rrn/acts_as_sourceable'
@@ -101,7 +101,7 @@ module ActsAsSourceable
101
101
  existing_source_ids = sourceable_institutions.pluck('holding_institution_id')
102
102
 
103
103
  # Delete those that have been removed
104
- condition = holding_institution_ids.any? ? "holding_institution_id NOT IN (?)" : nil # Can't use "NOT IN (?)" for an empty array because the result is always false
104
+ condition = holding_institution_ids.any? ? ["holding_institution_id NOT IN (?)", existing_source_ids] : nil # Can't use "NOT IN (?)" for an empty array because the result is always false
105
105
  SourceableInstitution.where(:sourceable_type => self.class.name, :sourceable_id => self.id).delete_all(condition)
106
106
 
107
107
  # Add those that are not present
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_sourceable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: