bullet_train-super_scaffolding 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83562ede1a8ba63e0c7ce22d2ad4b847966bad0c1cd9b768aa7eec899587181d
|
4
|
+
data.tar.gz: 403160c7f8f5fe3250c8c2874272d9db05c95a52a38c516a206746f4180df8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6c3a03a78758c8347c1a3a1c841382ab55b486453bf7008358c6c42d6afff6159cf5f150f9cfba1684c91ade3b2c32f3ea26f766832badd2684fc3e875445d
|
7
|
+
data.tar.gz: d019a81d9810e3586ba355e011dd1fbf19779963ca049b4df88a65ccb274387c488e7e74e4593f31fc20335e46359b86019f7b418336bfb71e1e0d83fe30b317
|
@@ -29,6 +29,14 @@ module BulletTrain
|
|
29
29
|
|
30
30
|
child = argv[0]
|
31
31
|
parents = argv[1] ? argv[1].split(",") : []
|
32
|
+
|
33
|
+
# Raise an error if the developer skipped adding the parent and went straight to the attributes.
|
34
|
+
if FIELD_PARTIALS.keys.map(&:to_s).include?(parents.first.split(":").last)
|
35
|
+
puts "It looks like you forgot to add the model's parent to your scaffolding command.".red
|
36
|
+
puts "Add the parent name after the model and try again.".red
|
37
|
+
exit
|
38
|
+
end
|
39
|
+
|
32
40
|
parents = parents.map(&:classify).uniq
|
33
41
|
parent = parents.first
|
34
42
|
child_parts = child.split("::")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|