paginated 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paginated.rb +1 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ae94c2ae8e872f233996072ec628db19b885a8538cafcf7ff3b75a2af99b933
4
- data.tar.gz: 2fd627408f5ad65ae5da8e72fd9b393db0e8cdaf7f2d1b073f02135ce37ea474
3
+ metadata.gz: 76e2b8888c610c376b97da4c118067cf4d6d1ac8d63e02fc11971638b9ad0595
4
+ data.tar.gz: a5fc2020f8d9a3adf16816e0d03d2e2419ed3128d806d23a5ce3d20a6831e442
5
5
  SHA512:
6
- metadata.gz: f73355fbbeda03857a8948618625392f69749f4bb968d9c4248662c31703db94cadb3a115013419d24b9fce418edf6db4db8c91dcbd6de855fae22a77a473ce0
7
- data.tar.gz: 1297773a18228ed479111c7cc84fad0a500cfd4af7c87d456e9abe5cc825bdd161716b31b5ffa8ec53c352e0a2b81c8bd94e959c15e552f8ac733a346991e702
6
+ metadata.gz: a3aa8e4b873a0498720d727d3517cb9576eb1b97a96884cdf2c8336b92f56a0016db99e1d6c3c49875bede9fc73dbd91d902180b05253e7079d9970504f9b01a
7
+ data.tar.gz: 7ad52eb2f7a3b3c3356781d7703f156f14ef4cec04d00dc14e825e0c6dd4ef10b868b9325b18ab2405d740d0ddc2d70072f09d4e91cc12f398548344ed66ce02
data/lib/paginated.rb CHANGED
@@ -46,7 +46,7 @@ class Paginated
46
46
  return cached_value if cached_value
47
47
 
48
48
  # получение кол-ва записей из запроса к БД
49
- db_value = @model.unscoped.merge(@scopes).count(:id)
49
+ db_value = @model.merge(@scopes).count(:id)
50
50
 
51
51
  # кеширование кол-ва записей при превышении порогового значения
52
52
  if db_value >= 1_000
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginated
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Павел Бабин
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails