udongo 7.3.3 → 7.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +5 -0
- data/config/environment.rb +0 -0
- data/lib/udongo/search/base.rb +4 -3
- data/lib/udongo/search/frontend.rb +4 -1
- data/lib/udongo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 962f42931f08cb1d74ebc2b55c6537bfc43b5c89
|
4
|
+
data.tar.gz: 7bccfc7ec53136d2c4f7ce67247765a2a876222b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715caffc5bf92d7e33ab60c211779de38eb76a4ec6d1ba3061c64500af985b46fe9e40c95bacd748a5101966f367631eab1df637136b35e863a40b7f295fe88c
|
7
|
+
data.tar.gz: 05426b6db33831349ca680a38b47936209ac5b6c06b57ccb695e75cb1e0439167f5141a2312b3a21e7812dbe7cdc3e5e19b30a2d26c00895980360673b4a6173
|
data/changelog.md
CHANGED
File without changes
|
data/lib/udongo/search/base.rb
CHANGED
@@ -44,10 +44,11 @@ module Udongo::Search
|
|
44
44
|
# correct order.
|
45
45
|
@indices ||= SearchModule.weighted.inject([]) do |stack, m|
|
46
46
|
# The group happens to make sure we end up with just 1 copy of
|
47
|
-
# a searchable result Otherwise matches from both an indexed
|
47
|
+
# a searchable result. Otherwise matches from both an indexed
|
48
48
|
# Page#title and Page#description would be in the result set.
|
49
|
-
stack << m.indices
|
50
|
-
|
49
|
+
stack << m.indices
|
50
|
+
.where('search_indices.value REGEXP ?', term.value)
|
51
|
+
.group([:searchable_type, :searchable_id])
|
51
52
|
end.flatten
|
52
53
|
end
|
53
54
|
|
@@ -12,10 +12,13 @@ module Udongo::Search
|
|
12
12
|
#
|
13
13
|
# Note that the result_object#url method is defined in
|
14
14
|
# Udongo::Search::ResultObjects::Frontend::Page.
|
15
|
+
#
|
16
|
+
# If you return nil in the #url method of a result object, the item
|
17
|
+
# will get filtered out of the search results.
|
15
18
|
def search
|
16
19
|
indices.map do |index|
|
17
20
|
result = result_object(index)
|
18
|
-
next if result.hidden? || result.unpublished?
|
21
|
+
next if result.hidden? || result.unpublished? || result.url.nil?
|
19
22
|
{ label: result.label, value: result.url }
|
20
23
|
end.select(&:present?)
|
21
24
|
end
|
data/lib/udongo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: udongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.3.
|
4
|
+
version: 7.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davy Hellemans
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-03-
|
12
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -747,6 +747,7 @@ files:
|
|
747
747
|
- app/views/layouts/backend/login.html.erb
|
748
748
|
- app/views/layouts/frontend/application.html.erb
|
749
749
|
- changelog.md
|
750
|
+
- config/environment.rb
|
750
751
|
- config/initializers/assets.rb
|
751
752
|
- config/initializers/ckeditor.rb
|
752
753
|
- config/initializers/core_ext/string.rb
|