tramway-admin 1.24.0.1 → 1.24.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7578bdb449595a98bf13522e94573b4bf9ec921698aa938d27e636d0ac0d49d
|
4
|
+
data.tar.gz: 83d5ad568477120abc3c21c54360bae2b60aab71c4f845a735fb748e41859794
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f64cb2ae55b85fd7e8ee10c1b2845bec4e6717be06f4d56f0e90dd3862c773f3c4eca5ae6b8a140d125abcde9e390d81177c5a0076f8ef1020de8367ee14ddc
|
7
|
+
data.tar.gz: 837040c4d56f0dacff5bc315564faaafa5a665469e18e13b01024f35fa1e9929a2b332165605c615fdd998bbfcf52c846a49ef69af97de6ca3d5c6ec712de602
|
@@ -32,6 +32,7 @@ module Tramway
|
|
32
32
|
@counts = decorator_class.collections.reduce({}) do |hash, collection|
|
33
33
|
records = model_class.active.send(collection)
|
34
34
|
records = records.send "#{current_user.role}_scope", current_user.id
|
35
|
+
records = records.ransack(params[:filter]).result if params[:filter].present?
|
35
36
|
hash.merge! collection => records.count
|
36
37
|
end
|
37
38
|
end
|
@@ -66,7 +66,7 @@ module Tramway::Admin
|
|
66
66
|
def tab_title(model_class, tab, count, _state_method = :state)
|
67
67
|
model = model_class.name.underscore
|
68
68
|
name = collection_human_name model_name: model, collection_name: tab
|
69
|
-
|
69
|
+
"#{name} / #{count}"
|
70
70
|
end
|
71
71
|
|
72
72
|
def active_tab(tab, index)
|