grape-listing 1.1.3 → 1.1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/grape_listing.rb +0 -1
- data/lib/listing_service/pagination.rb +1 -1
- data/lib/listing_service/search.rb +1 -1
- data/lib/listing_service/spreadsheet.rb +1 -1
- metadata +2 -3
- data/lib/extensions/object.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df43f38058e07a439caa2da68253d606fe76835de2a4de02e427ea16d5cc7952
|
4
|
+
data.tar.gz: 97fe79b8e410b1925837f5f26d1c458d53ae18205b46d00bb7664f8a0e5ad634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 697c2a08f77c8f16e33c0d11813536ed0e4e18e143a13e8e32d1e9d08d3f4ac29b335c71ad179a8c1fe90a0265b3bf22061560f4063b420bda5550f59449e70a
|
7
|
+
data.tar.gz: b85cd8a772356e7446a57770e71969578386f68c205c52ef410feb7d2b99ac1ae9f28d27e1ddcdf7ed6caa7a383eeff70a0ed099070c59bc33480871ae4311ce
|
data/README.md
CHANGED
data/lib/grape_listing.rb
CHANGED
@@ -17,7 +17,7 @@ module GrapeListing
|
|
17
17
|
|
18
18
|
def paginate
|
19
19
|
# коллекция записей ActiveRecord для применения аггрегирования
|
20
|
-
list = @objects || @model.
|
20
|
+
list = @objects || @model.merge(@scopes)
|
21
21
|
|
22
22
|
# применение сортировки и пагинации к коллекции записей
|
23
23
|
@objects = list.offset(@offset).merge(sort_proc).limit(@limit)
|
@@ -6,7 +6,7 @@ module GrapeListing
|
|
6
6
|
def search
|
7
7
|
@search_fields&.each do |field|
|
8
8
|
# коллекция записей для дальнейшей фильтрации
|
9
|
-
list = @objects || @model.
|
9
|
+
list = @objects || @model.merge(@scopes)
|
10
10
|
|
11
11
|
# оператор и значение для поиска
|
12
12
|
operator, value = search_operands(field)
|
@@ -8,7 +8,7 @@ module GrapeListing
|
|
8
8
|
search
|
9
9
|
|
10
10
|
# коллекция записей ActiveRecord для формирования эл. таблицы
|
11
|
-
records = @objects || @model.
|
11
|
+
records = @objects || @model.merge(@scopes)
|
12
12
|
|
13
13
|
# ограничение записей
|
14
14
|
records = records.order(:id).offset(@offset).limit(@limit)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-listing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.3
|
4
|
+
version: 1.1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Павел Бабин
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,7 +101,6 @@ extensions: []
|
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
103
|
- README.md
|
104
|
-
- lib/extensions/object.rb
|
105
104
|
- lib/grape-listing.rb
|
106
105
|
- lib/grape/dsl.rb
|
107
106
|
- lib/grape_listing.rb
|