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: 70925d39994d0941e75bece5c0b240134d2b32470d31199c513a2e25faddc840
4
- data.tar.gz: 6c8effd26cf0f030a293adb9c1542bd13fb3dd294e553544a23370d2ec6648f5
3
+ metadata.gz: 609cb873f8ee7b06289d1b6a892e5dfdf31d331fec0e70524193966b8dae6fb5
4
+ data.tar.gz: e931912e980cf36b614deae0cf70f729f3e6e98fa78d6b415de4ccd5f13d687d
5
5
  SHA512:
6
- metadata.gz: 0a538fa3618b3b1faf92f7ca4e8dad13ce41656e1b4327c7ff14813c9760127bbec87f3bfae4c929ddbacd8ae7a2bd4f3cc236e31860203c5a97dc2d61d4cc7f
7
- data.tar.gz: f69803876b65edbd994fc7056903520a81f26907fbc8131260188e2fadcc32c4d7b22c62dd4677b468d996690b6011263e6140c2193477a8b2de3e329c3df776
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 a possible blank string
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 tags=(input)
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.where(id: tag_id).first!
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: [:title, :menu_title, :meta_description, :slug]
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
@@ -5,4 +5,4 @@ en:
5
5
 
6
6
  activerecord:
7
7
  models:
8
- effective/tagging: 'Tagged content'
8
+ effective/tagging: 'Taggings'
@@ -1,3 +1,3 @@
1
1
  module EffectivePages
2
- VERSION = '3.7.3'.freeze
2
+ VERSION = '3.7.4'.freeze
3
3
  end
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.3
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-19 00:00:00.000000000 Z
11
+ date: 2023-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails