bullet_train-super_scaffolding 1.3.22 → 1.3.23

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: e9210f83ebe43b35a2f22c251699259b4c019dda13edfd97ee8b86a36b1c4076
4
- data.tar.gz: 377c1286afbd0dc549bd606abaf4f4c5eca77461c80586344ebf0cb7905db1fd
3
+ metadata.gz: bbcde213b30f69abe18110f85a59c1e5b19d7f4bdfcb31cf587fbe28918c382e
4
+ data.tar.gz: c64d0d9b5e650e198fc25694ad24e53d914e3e3fee3954d87bcbe3e384989def
5
5
  SHA512:
6
- metadata.gz: df76ecad025409b2d23c5140f5d7b05710bcfd8ac8723c2f6dab2055d83d37f301a17224a9280313829f517a514004b5ecb78837474642365dde18da9f293494
7
- data.tar.gz: 135cb316d50b1d502e2d8803e33de8181252efb6672778107f00e066807e2324668e4f0e1c2f35a1ccdbbb32f3fa23289203ec3cb0098abe6c4593f2db434bca
6
+ metadata.gz: 981b5c308a58f8ad114892237c98d9ef1c4e93e59126ddc55eba47b4cc14aaef974f41a46f3932d64736a09dd3c36d499b31160a9c5c023901a79f13e4aafe72
7
+ data.tar.gz: e66e54444da188afcfbc8756d16bfb17e9f0178056cd57adf85dabeb5699b22489f9a9ef6f9a02c60086e17bcdd29889fc0d9c2f4ab91beeaac0e6d716bb5e0d
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.3.22"
3
+ VERSION = "1.3.23"
4
4
  end
5
5
  end
@@ -111,8 +111,8 @@ class Scaffolding::Attribute
111
111
  if is_ids?
112
112
  # user_ids should be 'Users'
113
113
  name_without_ids.humanize.titlecase
114
- elsif is_id?
115
- name_without_id.humanize.titlecase
114
+ elsif is_id? && is_vanilla?
115
+ "#{name.humanize.titlecase} ID"
116
116
  else
117
117
  name.humanize.titlecase
118
118
  end
@@ -820,7 +820,7 @@ class Scaffolding::Transformer
820
820
 
821
821
  # this gets stripped and is one line, so indentation isn't a problem.
822
822
  field_content = <<-ERB
823
- <%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.name_without_id_suffix} %>
823
+ <%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix} %>
824
824
  ERB
825
825
 
826
826
  if attribute.type == "password_field"
@@ -839,7 +839,7 @@ class Scaffolding::Transformer
839
839
  unless cli_options["skip-table"]
840
840
 
841
841
  # table header.
842
- field_content = "<th#{cell_attributes.present? ? " " + cell_attributes : ""}><%= t('.fields.#{attribute.name_without_id_suffix}.heading') %></th>"
842
+ field_content = "<th#{cell_attributes.present? ? " " + cell_attributes : ""}><%= t('.fields.#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix}.heading') %></th>"
843
843
 
844
844
  unless ["Team", "User"].include?(child)
845
845
  scaffold_add_line_to_file("./app/views/account/scaffolding/completely_concrete/tangible_things/_index.html.erb", field_content, "<%# 🚅 super scaffolding will insert new field headers above this line. %>", prepend: true)
@@ -867,7 +867,7 @@ class Scaffolding::Transformer
867
867
 
868
868
  # this gets stripped and is one line, so indentation isn't a problem.
869
869
  field_content = <<-ERB
870
- <td#{cell_attributes}><%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.name_without_id_suffix}#{", #{table_cell_options.join(", ")}" if table_cell_options.any?} %></td>
870
+ <td#{cell_attributes}><%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix}#{", #{table_cell_options.join(", ")}" if table_cell_options.any?} %></td>
871
871
  ERB
872
872
 
873
873
  if attribute.type == "password_field"
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.3.22
4
+ version: 1.3.23
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-09-01 00:00:00.000000000 Z
11
+ date: 2023-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard