effective_pages 3.7.3 → 3.7.4
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: 609cb873f8ee7b06289d1b6a892e5dfdf31d331fec0e70524193966b8dae6fb5
|
4
|
+
data.tar.gz: e931912e980cf36b614deae0cf70f729f3e6e98fa78d6b415de4ccd5f13d687d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4f370e424c4fa6d03146b15f2b15e67f747202009c4b264bad9b2fa1debc398a5fdb322ff4cabe1dc5fd7220bdd33a2effa4ccb4f72ee9df12be97695187f2
|
7
|
+
data.tar.gz: 5678d59ab27e06eb7320710462451917512e91f6c8010087dcea656b745f80442b5a4b9ca17f06d29f2818e910c32feaffc7dce464b7f76aad440e81ba4f3499
|
@@ -18,11 +18,11 @@ module ActsAsTagged
|
|
18
18
|
#
|
19
19
|
# Create or assign tags based on the input
|
20
20
|
#
|
21
|
-
# @param [Array<String, Integer>] input An array of tag names and/or tag ids, with
|
21
|
+
# @param [Array<String, Integer>] input An array of tag names and/or tag ids, with possible blank strings
|
22
22
|
#
|
23
23
|
# @return [void]
|
24
24
|
#
|
25
|
-
def
|
25
|
+
def tag_ids=(input) # named after the field name in `effective_pages/app/views/effective/tags/_fields.html.haml`
|
26
26
|
input = (input - ['']).group_by { |value| value.gsub(/\D/, '').to_i > 0 }
|
27
27
|
|
28
28
|
ids = (input[true] || []).map(&:to_i)
|
@@ -33,7 +33,7 @@ module ActsAsTagged
|
|
33
33
|
|
34
34
|
# Create any new Tags
|
35
35
|
ids.each do |tag_id|
|
36
|
-
taggings.find { |tagging| tagging.tag_id == tag_id } || self.tags << Effective::Tag.
|
36
|
+
taggings.find { |tagging| tagging.tag_id == tag_id } || self.tags << Effective::Tag.find(tag_id)
|
37
37
|
end
|
38
38
|
|
39
39
|
names.each { |name| self.tags.build(name: name) }
|
@@ -3,7 +3,11 @@ module Effective
|
|
3
3
|
if defined?(PgSearch)
|
4
4
|
include PgSearch::Model
|
5
5
|
|
6
|
-
multisearchable against: [:
|
6
|
+
multisearchable against: [:search_content]
|
7
|
+
|
8
|
+
def search_content
|
9
|
+
title + '|' + body.to_plain_text
|
10
|
+
end
|
7
11
|
end
|
8
12
|
|
9
13
|
attr_accessor :current_user
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|