acts_as_sourceable 2.1.1 → 2.1.2
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.
@@ -31,10 +31,10 @@ module ActsAsSourceable
|
|
31
31
|
scope :unsourced, where(options[:cache_column] => false)
|
32
32
|
elsif options[:through]
|
33
33
|
scope :sourced, joins(options[:through]).uniq
|
34
|
-
scope :unsourced,
|
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,
|
37
|
+
scope :unsourced, joins("LEFT OUTER JOIN (#{sourced.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.
|
4
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -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.
|
46
|
+
rubygems_version: 1.8.24
|
47
47
|
signing_key:
|
48
48
|
specification_version: 3
|
49
49
|
summary: perform garbage collection on categories that are no longer referenced
|