bullet_train-super_scaffolding 1.20.0 → 1.21.0

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: 8adf61bba2e54db1d7e85d65827fd10a961495e714bfc9b424cba7814fab8e7d
4
- data.tar.gz: 269cf217a24b5420814e74f860896fea75393fe1f5cc70beabcb9d897cb42d01
3
+ metadata.gz: 18f241fcb2c0833794677543f1f5e1708e52780d031afa17667082688b5a7900
4
+ data.tar.gz: e60606c64056414bc1c38454adb7e6bce8028d61405e0a3c9277ea92f06d8f89
5
5
  SHA512:
6
- metadata.gz: 29bbf326ed78095e1944babf26b8ad6f898c639359554746ce83afadb8efd204cd16523827cca9d0325a272471cfd6f1201d8f5fad4964b11809a1fe1da3cbe6
7
- data.tar.gz: 8d86da72a341975466eca6d0acf6a54887ca86a069a1c6b3dc220deca67757bd4bb800a9e18c1f3fe5e7fbfde17822b3951895cdd89538a5fa12b9e850a6af0d
6
+ metadata.gz: 60fc018c6b679c5293d83aa35eeadaaa9f9880900fa9d30bdc7ba9a8e64ed46f74a933c36f6a0e52ccbb426dce559227b6debc2c218045beaf9abc431b222f98
7
+ data.tar.gz: ad44026e89ef490995c10c56741276a82408e4de2c5540fd90031833665fa826fddefeb4729309c654a58bf660bdd3dd4536e02a67b25e74b44d3797a0ad4b9e
@@ -11,7 +11,7 @@
11
11
  <% unless hide_actions %>
12
12
  <%# We write the full path here since this partial is called from different scopes. %>
13
13
  <%= link_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.edit'), [:edit, :account, creative_concept], class: 'button-secondary button-smaller' if can? :edit, creative_concept %>
14
- <%= button_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.destroy'), [:account, creative_concept], method: :delete, data: { confirm: t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.confirmations.destroy', model_locales(creative_concept)) }, class: 'button-secondary button-smaller' if can? :destroy, creative_concept %>
14
+ <%= button_to t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.shorthand.destroy'), [:account, creative_concept], method: :delete, data: { turbo_confirm: t('account.scaffolding.absolutely_abstract.creative_concepts.buttons.confirmations.destroy', model_locales(creative_concept)) }, class: 'button-secondary button-smaller' if can? :destroy, creative_concept %>
15
15
  <% end %>
16
16
  </td>
17
17
  </tr>
@@ -14,7 +14,7 @@
14
14
 
15
15
  <% box.actions do %>
16
16
  <%= link_to t('.buttons.edit'), [:edit, :account, @creative_concept], class: first_button_primary if can? :edit, @creative_concept %>
17
- <%= button_to t('.buttons.destroy'), [:account, @creative_concept], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@creative_concept)) } if can? :destroy, @creative_concept %>
17
+ <%= button_to t('.buttons.destroy'), [:account, @creative_concept], method: :delete, class: first_button_primary, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(@creative_concept)) } if can? :destroy, @creative_concept %>
18
18
  <%= link_to t('global.buttons.back'), [:account, @team, :scaffolding_absolutely_abstract_creative_concepts], class: first_button_primary %>
19
19
  <% end %>
20
20
  <% end %>
@@ -21,7 +21,7 @@
21
21
  <%= link_to t('.buttons.shorthand.edit'), [:edit, :account, tangible_thing], class: 'button-secondary button-smaller' %>
22
22
  <% end %>
23
23
  <% if can? :destroy, tangible_thing %>
24
- <%= button_to t('.buttons.shorthand.destroy'), [:account, tangible_thing], method: :delete, data: { confirm: t('.buttons.confirmations.destroy', model_locales(tangible_thing)) }, class: 'button-secondary button-smaller' %>
24
+ <%= button_to t('.buttons.shorthand.destroy'), [:account, tangible_thing], method: :delete, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(tangible_thing)) }, class: 'button-secondary button-smaller' %>
25
25
  <% end %>
26
26
  <%# 🚅 super scaffolding will insert new action model buttons above this line. %>
27
27
  <% end %>
@@ -39,7 +39,7 @@
39
39
  <% box.actions do %>
40
40
  <%= link_to t('.buttons.edit'), [:edit, :account, @tangible_thing], class: first_button_primary if can? :edit, @tangible_thing %>
41
41
  <%# 🚅 super scaffolding will insert new action model buttons above this line. %>
42
- <%= button_to t('.buttons.destroy'), [:account, @tangible_thing], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@tangible_thing)) } if can? :destroy, @tangible_thing %>
42
+ <%= button_to t('.buttons.destroy'), [:account, @tangible_thing], method: :delete, class: first_button_primary, data: { turbo_confirm: t('.buttons.confirmations.destroy', model_locales(@tangible_thing)) } if can? :destroy, @tangible_thing %>
43
43
  <%= link_to t('global.buttons.back'), [:account, @absolutely_abstract_creative_concept, :completely_concrete_tangible_things], class: first_button_primary %>
44
44
  <% end %>
45
45
 
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.20.0"
3
+ VERSION = "1.21.0"
4
4
  end
5
5
  end
@@ -814,33 +814,6 @@ class Scaffolding::Transformer
814
814
 
815
815
  unless cli_options["skip-show"]
816
816
 
817
- # TODO: Seems like this block of code is useless?
818
- # standard:disable Lint/Void
819
- if attribute.is_id?
820
- <<~ERB
821
- <% if @tangible_thing.#{attribute.name_without_id} %>
822
- <div class="form-group">
823
- <label class="col-form-label"><%= t('.fields.#{attribute.name}.heading') %></label>
824
- <div>
825
- <%= link_to @tangible_thing.#{attribute.name_without_id}.#{attribute.options[:label]}, [:account, @tangible_thing.#{attribute.name_without_id}] %>
826
- </div>
827
- </div>
828
- <% end %>
829
- ERB
830
- elsif attribute.is_ids?
831
- <<~ERB
832
- <% if @tangible_thing.#{attribute.collection_name}.any? %>
833
- <div class="form-group">
834
- <label class="col-form-label"><%= t('.fields.#{attribute.name}.heading') %></label>
835
- <div>
836
- <%= @tangible_thing.#{attribute.collection_name}.map { |#{attribute.name_without_ids}| link_to #{attribute.name_without_ids}.#{attribute.options[:label]}, [:account, #{attribute.name_without_ids}] }.to_sentence.html_safe %>
837
- </div>
838
- </div>
839
- <% end %>
840
- ERB
841
- end
842
- # standard:enable Lint/Void
843
-
844
817
  # this gets stripped and is one line, so indentation isn't a problem.
845
818
  field_content = <<-ERB
846
819
  <%= render 'shared/attributes/#{attribute.partial_name}', attribute: :#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix} %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-super_scaffolding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver