acts_as_sourceable 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module ActsAsSourceable
34
34
  scope :unsourced, joins("LEFT OUTER JOIN (#{sourced.to_sql}) sourced ON sourced.id = #{table_name}.id").where("sourced.id IS NULL")
35
35
  else
36
36
  scope :sourced, joins(:sourceable_registry_entries).uniq
37
- scope :unsourced, joins("LEFT OUTER JOIN (#{sourced.to_sql}) sourced ON sourced.id = #{table_name}.id").where("sourced.id IS NULL")
37
+ scope :unsourced, joins("LEFT OUTER JOIN (#{ActsAsSourceable::RegistryEntry.select('sourceable_id AS id').where(:sourceable_type => self).to_sql}) sourced ON sourced.id = #{table_name}.id").where("sourced.id IS NULL")
38
38
  end
39
39
 
40
40
  # Add a way of finding everything sourced by a particular set of records
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: 2.1.2
4
+ version: 2.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-09 00:00:00.000000000 Z
13
+ date: 2013-02-12 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Allows the RRN to perform garbage collection on categories that are no
16
16
  longer referenced.
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  requirements: []
45
45
  rubyforge_project:
46
- rubygems_version: 1.8.24
46
+ rubygems_version: 1.8.25
47
47
  signing_key:
48
48
  specification_version: 3
49
49
  summary: perform garbage collection on categories that are no longer referenced