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: 4daf211d2bdfa4cdfed707713e865468f546e99e33217454a3a344623e323b24
4
- data.tar.gz: 73a5b7db62adb169f77eab98ebf2480b23a38eaa26d365c98262b34501e8fff3
3
+ metadata.gz: 83562ede1a8ba63e0c7ce22d2ad4b847966bad0c1cd9b768aa7eec899587181d
4
+ data.tar.gz: 403160c7f8f5fe3250c8c2874272d9db05c95a52a38c516a206746f4180df8be
5
5
  SHA512:
6
- metadata.gz: b1f123b55cd71806b43e84da083b8db0c86e655e26d831937651c20c3be179b0d9190fc46a9f72fcc601441b9dd1984352fc06d5e15d88830971999acdcdf6c5
7
- data.tar.gz: 21f3158dbbc7af72e1d6610c93e5daeb96e1c1e9f26882dc2acb57231981e9fc8f534c35e592d502bef9306b8c618a21e8f19bc94df54e43f9a81577766c0829
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("::")
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.6.7"
3
+ VERSION = "1.6.8"
4
4
  end
5
5
  end
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.7
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-10-23 00:00:00.000000000 Z
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard