effective_posts 2.7.3 → 2.8.0

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: fb524b7de78941ff7ddc02bd3fed11f561ac7dc8bda6a0f46d093fc84c86de4a
4
- data.tar.gz: b59781526ef9fef657ffd9eff3cf8e732896e0279cad97fede886b8e769da93f
3
+ metadata.gz: bde5e656dd3fde528efd6721dcc6e07b5c19961fb2b7ba0de5171f37724e608c
4
+ data.tar.gz: e842c001e3b345812c3c686a6a318c76c56369c587e0b1c95950d2f785f29d8b
5
5
  SHA512:
6
- metadata.gz: 3413d26186e3df2707e43545a76f172e53fa063154f089fbca5699fbe7eebaa8e6f2f6136b1fccd160d8f525e0114e5ff77d7860ea86853411ef2d1ff6ac71e8
7
- data.tar.gz: 990ecea8f2107abdcb4ea7090109c7b74dfc627ef5700fe3c72c26b94d359ba8e000ea3517d7197d09c5cde68779d6906a4e9eccb4da92d30e4bbe3af9004340
6
+ metadata.gz: 3960b26be3a24db766a56bab72b8855cf6628f1f33071e1348a078796a90396a2b46a2bce09053f0fa0331c43e16fda7df11d4f00b1ddcca5979f39d019f92eb
7
+ data.tar.gz: bd8883db4146db72c6cd75c1d0efbd0964c85b7d95c472ad67358d3f9fb7d2fafa1c765f01f3d936162697c6b633d035b644159980ba90b9183d6d08075902d6
@@ -6,7 +6,7 @@ module Effective
6
6
 
7
7
  if defined?(PgSearch)
8
8
  include PgSearch::Model
9
- multisearchable against: [:body]
9
+ multisearchable against: [:title, :body]
10
10
  end
11
11
 
12
12
  attr_accessor :current_user
@@ -89,11 +89,7 @@ module Effective
89
89
  scope = all.deep.order(arel_table[:published_start_at].desc.nulls_last)
90
90
 
91
91
  if defined?(EffectiveRoles) && EffectivePosts.use_effective_roles
92
- if user.present? && user.respond_to?(:roles)
93
- scope = scope.for_role(user.roles)
94
- else
95
- scope = scope.for_role([])
96
- end
92
+ scope = scope.for_role(user&.roles)
97
93
  end
98
94
 
99
95
  if category.present?
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '2.7.3'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3
4
+ version: 2.8.0
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: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2024-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails