faceted_search 3.5.6 → 3.5.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80006422a406840a486d9c8f5a50e1a2425057b285af095e95ee359021a1c1d7
|
4
|
+
data.tar.gz: 578682f035d0315fe84a4950e78879eb0f9654b5d9ff2582b091672473c517ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee0870c176285f42f78bb0c244a52783dcc54733b1d0ad1fc5a3db88b069b72d0222bc2c87b6873fd1b503f5d5b2f58f6782c905963d38ece704ded9b5b21c0d
|
7
|
+
data.tar.gz: f0f3ab3e4019737a2d48a364f74b82bc449a1d8d26f94972d3830dcf8334b61b2d473026832cec7d6247ac8bf88eb59e68f0e03237c6e30e54d88a091d199b5b
|
@@ -3,9 +3,12 @@ module FacetedSearch
|
|
3
3
|
|
4
4
|
def source
|
5
5
|
@source ||= begin
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
if @options[:source].present?
|
7
|
+
@options[:source]
|
8
|
+
else
|
9
|
+
results = params_array.blank? ? facets.results : facets.results_except(@name)
|
10
|
+
results.send(:all).pluck(name).compact.map(&:year).uniq.sort
|
11
|
+
end
|
9
12
|
end
|
10
13
|
end
|
11
14
|
|
@@ -3,9 +3,12 @@ module FacetedSearch
|
|
3
3
|
|
4
4
|
def source
|
5
5
|
@source ||= begin
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
if @options[:source].present?
|
7
|
+
@options[:source]
|
8
|
+
else
|
9
|
+
results = params_array.compact.blank? ? facets.results : facets.results_except(@name)
|
10
|
+
results.send(:all).where("#{field} IS NOT NULL")
|
11
|
+
end
|
9
12
|
end
|
10
13
|
@options[:source].where("#{field} IS NOT NULL")
|
11
14
|
end
|