avo 3.10.8 → 3.10.9

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: e0d0e0602fcf893f1c48a77984775ec02f57ec10b6b7dc1bbc8b962ab1b5f286
4
- data.tar.gz: 004a61fe586d3e0fae740bac00916ca869406dd3809b85496e09a14966675346
3
+ metadata.gz: 2fcdd8c5c729fbd6351b0ec4dc1303353342d135ab920890bea342dfc361b7b7
4
+ data.tar.gz: b9e9196b3a232846cea27b43598d08ccd268ba9c93b0d7e2326a23dea81d14cd
5
5
  SHA512:
6
- metadata.gz: b627c9d6abd87886c487ee4170acd85872794ad275bb18139e1009fdc9af9ac2924813e548f8a303e9130cfd65de1ab39faaf43a3174c4a26fbefcab34bc8e7b
7
- data.tar.gz: '08734e5bc1bb7719119c6bea3ea2ffde94b71fccc6fc7feee34325ee04b25a815472599280854f2a19fd94c1e8f09ea6c50c131d2bfcc6a3a372c287cbfe5a79'
6
+ metadata.gz: 429a6fe952e02c234593260015f8dc065a995e55498737a841f498ef885a837ed411bb97831334b4a81e5a6df01a4f8d3b2c8538d3356ca1dbb7c748c44e9731
7
+ data.tar.gz: 5591505610679d89e29347b70ad1e0569811bcb79d7542418c9327a9ecd8d17776c62e3376cc5971dcc9ad170cffca52888037465c084c15eef74af9677bbea5
data/Gemfile.lock CHANGED
@@ -115,7 +115,7 @@ GIT
115
115
  PATH
116
116
  remote: .
117
117
  specs:
118
- avo (3.10.8)
118
+ avo (3.10.9)
119
119
  actionview (>= 6.1)
120
120
  active_link_to
121
121
  activerecord (>= 6.1)
@@ -28,7 +28,7 @@ class Avo::PaginatorComponent < Avo::BaseComponent
28
28
  def render?
29
29
  return false if discreet_pagination && pagy.pages <= 1
30
30
 
31
- if defined?(@pagy.limit)
31
+ if ::Pagy::VERSION > ::Gem::Version.new("9.0")
32
32
  @pagy.limit > 0
33
33
  else
34
34
  @pagy.items > 0
@@ -47,7 +47,7 @@ module Avo
47
47
  query: resource.query_scope
48
48
  ).handle
49
49
 
50
- results_count, results = parse_results(query)
50
+ results_count, results = parse_results(query, resource)
51
51
 
52
52
  header = resource.plural_name
53
53
 
@@ -205,7 +205,7 @@ module Avo
205
205
  end
206
206
  end
207
207
 
208
- def parse_results(query)
208
+ def parse_results(query, resource)
209
209
  # When using custom search services query should return an array of hashes
210
210
  if query.is_a?(Array)
211
211
  # Apply highlight
@@ -1,6 +1,8 @@
1
1
  require "pagy/extras/trim"
2
2
  require "pagy/extras/countless"
3
- require "pagy/extras/size"
3
+ if ::Pagy::VERSION > ::Gem::Version.new("9.0")
4
+ require "pagy/extras/size"
5
+ end
4
6
 
5
7
  # For locales without native pagy i18n support
6
8
  def pagy_locale_path(file_name)
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.10.8" unless const_defined?(:VERSION)
2
+ VERSION = "3.10.9" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.8
4
+ version: 3.10.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin