plutonium 0.15.17 → 0.15.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/pu/res/conn/conn_generator.rb +4 -1
- data/lib/plutonium/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: 101dea0b2a6fa8d1cc3fcf5d16f5ab1d932efd7ab90fa9d23561c78bfa3af777
|
4
|
+
data.tar.gz: dc712fdd97f6783eec587fb8ad5066326be59c93f603027e11410e7f9d66ed7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e86bf5065b802c8808ac2704a134cf8cdbc6730602fc29864d34e163599e71c981c8f3a0730d3de9270ba37b9698c5ff58acfba8558318a760c3bfde1804fa
|
7
|
+
data.tar.gz: ad31b7f1e0ca7dd07c249bfceed34ff136bd7dda5b8815786a443882da9fd8dd8429355e175afce71a488de7639324c866a794196a24bf57c6085c6dc112c139
|
@@ -18,7 +18,10 @@ module Pu
|
|
18
18
|
source_module = (source_feature == "main_app") ? "ApplicationRecord" : "#{source_feature.camelize}::ResourceRecord"
|
19
19
|
|
20
20
|
Plutonium.eager_load_rails!
|
21
|
-
available_resources = source_module.constantize.descendants.
|
21
|
+
available_resources = source_module.constantize.descendants.reject do |model|
|
22
|
+
next true if model.abstract_class?
|
23
|
+
next true if source_module == "ApplicationRecord" && model.ancestors.any? { |ancestor| ancestor.to_s.end_with?("::ResourceRecord") }
|
24
|
+
end.map(&:to_s).sort
|
22
25
|
error "No resources found" if available_resources.blank?
|
23
26
|
selected_resources = prompt.multi_select("Select resources", available_resources)
|
24
27
|
|
data/lib/plutonium/version.rb
CHANGED