models_auditor 1.2.0 → 1.2.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1379f47b3175d0e092a3fe67e5a3d344219b9515
|
4
|
+
data.tar.gz: b18b8a5be1eb4f5b355213c3e37d7c808b5cfbf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20a11e72fe62e25dbb3f4b38ce3e0326512cbb528f19db7d4b9c1b697074fa2427dc5a21fd16285029a7de6c3e364ed416d51af7365411b924016981346a6a49
|
7
|
+
data.tar.gz: 7f9339b9c77ea9c1cc600cc1aa7bcd7167b0b48dd2f28e0708f6434c54be7c2e54fea946fa71eb1aeef7276e9bd53e5570ed7d680f4ec392c50512c3e5303df2
|
@@ -25,9 +25,9 @@ module ModelsAuditor
|
|
25
25
|
render json: {
|
26
26
|
ModelsAuditor.config.json_response_data_key => formatter.as_json,
|
27
27
|
ModelsAuditor.config.json_response_meta_key => {
|
28
|
-
per_page: @collection.per_page,
|
29
|
-
total: @collection.total_entries,
|
30
|
-
sort_by:
|
28
|
+
per_page: paginate_info[:per_page] || @collection.per_page,
|
29
|
+
total: paginate_info[:total_entries] || @collection.total_entries,
|
30
|
+
sort_by: @collection.order_info
|
31
31
|
}
|
32
32
|
}
|
33
33
|
}
|
@@ -76,7 +76,9 @@ module ModelsAuditor
|
|
76
76
|
end
|
77
77
|
|
78
78
|
filtered_requests = collection.pluck(:id)
|
79
|
-
original
|
79
|
+
original
|
80
|
+
.paginate(page: 1, per_page: original.per_page, total_entries: original.total_entries)
|
81
|
+
.where(id: filtered_requests)
|
80
82
|
end
|
81
83
|
|
82
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: models_auditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Gorbunov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|