tramway-admin 1.7.7.1 → 1.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tramway/admin.rb +6 -1
- data/lib/tramway/admin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3853d33fef58959a023f924776a7d0c9ec2bcab93f7af0403b19313689591436
|
4
|
+
data.tar.gz: 78e1f5e5ae3eb6bf274ae0011a04d17e371aebf8419e6f2d26c888b99c50a93b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a0479daa4c17c851755b71b07411287072418d49b64d127b4a48066ccae944e5d565235809ccaeaa028f0aa8cdabd7378e45499fb389f7645eedd9c8950b8cb
|
7
|
+
data.tar.gz: 0b7278023197415bea97b0845c4935ec1fe70d4253fd9e66ec4b8272f3022d9173fa7593a63149553c82368b080e41031df0ba3d6c515ca486e9450322786e69
|
data/lib/tramway/admin.rb
CHANGED
@@ -28,7 +28,12 @@ module Tramway
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def available_models
|
31
|
-
@available_models
|
31
|
+
if @available_models
|
32
|
+
@available_models.values.flatten
|
33
|
+
else
|
34
|
+
error = Tramway::Error.new(plugin: :admin, method: :available_models, message: ('List of available_models is empty. You should add some of them using `::Tramway::Admin.set_available_models(*list_of_classes, project: :your_project_name)` in `config/initializers/tramway.rb`'))
|
35
|
+
raise error.message
|
36
|
+
end
|
32
37
|
end
|
33
38
|
|
34
39
|
def set_singleton_models(*models, project:)
|