effective_posts 2.7.3 → 2.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: fb524b7de78941ff7ddc02bd3fed11f561ac7dc8bda6a0f46d093fc84c86de4a
4
- data.tar.gz: b59781526ef9fef657ffd9eff3cf8e732896e0279cad97fede886b8e769da93f
3
+ metadata.gz: 2de1e57d74d589f50d3515a2853108e482735e77040253b68d011a594ad14782
4
+ data.tar.gz: 53cca2477debcdfa215d8e4b50a6eb394142cec9bd4c16075dd843c1e2fe8367
5
5
  SHA512:
6
- metadata.gz: 3413d26186e3df2707e43545a76f172e53fa063154f089fbca5699fbe7eebaa8e6f2f6136b1fccd160d8f525e0114e5ff77d7860ea86853411ef2d1ff6ac71e8
7
- data.tar.gz: 990ecea8f2107abdcb4ea7090109c7b74dfc627ef5700fe3c72c26b94d359ba8e000ea3517d7197d09c5cde68779d6906a4e9eccb4da92d30e4bbe3af9004340
6
+ metadata.gz: 960b0c9fdcf9a28bf9975fae28470c676b430a66ca5d980d4b57cfcd91e8f56c8b3a07f0b2e19bb0a03c3d5ad1e1d07cfe27da4bf41acade69d0c01271ca8634
7
+ data.tar.gz: 102cad6a101b4b5fef4f98770a2eba5b15d8dd53b8a6b3d79e277066c9d1b88a55ca8bb89c60fb949e4576ba22ff7c7f3564d8eac5c2425dffc041d592a7d580
@@ -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.7.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect