bullet_train-super_scaffolding 1.2.19 → 1.2.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_index.html.erb +5 -5
  3. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_menu_item.html.erb +1 -1
  4. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_index.html.erb +5 -10
  5. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_menu_item.html.erb +1 -1
  6. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/edit.html.erb +5 -10
  7. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/index.html.erb +3 -5
  8. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/new.html.erb +5 -10
  9. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/show.html.erb +7 -9
  10. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/edit.html.erb +5 -10
  11. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/index.html.erb +3 -5
  12. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/new.html.erb +5 -10
  13. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb +13 -20
  14. data/app/views/account/scaffolding/completely_concrete/tangible_things/_index.html.erb +6 -6
  15. data/app/views/account/scaffolding/completely_concrete/tangible_things/_menu_item.html.erb +1 -1
  16. data/app/views/account/scaffolding/completely_concrete/tangible_things/edit.html.erb +5 -10
  17. data/app/views/account/scaffolding/completely_concrete/tangible_things/index.html.erb +3 -5
  18. data/app/views/account/scaffolding/completely_concrete/tangible_things/new.html.erb +5 -10
  19. data/app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb +9 -9
  20. data/lib/bullet_train/super_scaffolding/version.rb +1 -1
  21. data/lib/scaffolding/file_manipulator.rb +1 -1
  22. data/lib/scaffolding/transformer.rb +6 -4
  23. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a3c3093d8ec80230c40009a71e1e17fcec9763fbc29c550f6b9d58d02bcdabd
4
- data.tar.gz: 7e3574b17f2856743920f385cf6c19a03f939b7684d7907221db7b5c811c737b
3
+ metadata.gz: 223f16f152b545b1554a030ef0f492740fa59825d34f62ffc4685aadb6b7882e
4
+ data.tar.gz: cda0b98a79b3d69c020e0ff61b7d4e40cb9029a382a760041cb2f3d6ec306d61
5
5
  SHA512:
6
- metadata.gz: e861799518ca1c86b8e4e2c146acde7af79bd08bab5caa0b4ee44c65f7c17728e6a8b6088f359b1a0341987e9ec2026c7c59835993adfc7b0ad99e1bc700581f
7
- data.tar.gz: 3493d0bd968ad720dc04cf6511cda909da9ef1dd94ba4e00d1f5c2a01f5df1c8bdc5788d8c00ec5be9d0d576b8dc5bb49d5bb7d8000e70f3c8df70b7f42901e2
6
+ metadata.gz: 5ccd6e1495cd0f281bec5c3474694d43effb3fbad17dd438e808733526e7dcebb0f9584f4d3c375aaebbf44871cca3c2ca11b0f41ed801a9e537f30edfa7d896
7
+ data.tar.gz: 3949161365fc870eb977eb9962482123c8d30da896def52807ef0936dc86fd4089385a6147c94fcec71242d1fd988f60eb286f82f6e5b71bf5c0cc9bccf51dea
@@ -7,15 +7,15 @@
7
7
  <% pagy, creative_concepts = pagy(creative_concepts, page_param: :creative_concepts_page) unless pagy %>
8
8
 
9
9
  <%= updates_for context, :scaffolding_absolutely_abstract_creative_concepts do %>
10
- <%= render 'account/shared/box' do |p| %>
11
- <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %>
12
- <% p.content_for :description do %>
10
+ <%= render 'account/shared/box' do |box| %>
11
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
12
+ <% box.description do %>
13
13
  <%= t(".contexts.#{context.class.name.underscore}.description").html_safe %>
14
14
  <%= render "shared/limits/index", model: creative_concepts.model %>
15
15
  <% end %>
16
16
 
17
17
  <% if creative_concepts.any? %>
18
- <% p.content_for :table do %>
18
+ <% box.table do %>
19
19
  <table class="table">
20
20
  <thead>
21
21
  <tr>
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
  <% end %>
37
37
 
38
- <% p.content_for :actions do %>
38
+ <% box.actions do %>
39
39
  <% unless hide_actions %>
40
40
  <% if can? :create, Scaffolding::AbsolutelyAbstract::CreativeConcept.new(team: @team) %>
41
41
  <%= link_to t('.buttons.new'), [:new, :account, @team, :scaffolding_absolutely_abstract_creative_concept], class: "#{first_button_primary(:absolutely_abstract_creative_concept)} new" %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, current_team, :scaffolding_absolutely_abstract_creative_concepts]),
4
4
  label: t('scaffolding/absolutely_abstract/creative_concepts.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('scaffolding/absolutely_abstract/creative_concepts.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -4,16 +4,11 @@
4
4
  <% hide_actions ||= false %>
5
5
  <% hide_back ||= false %>
6
6
 
7
- <%= render 'account/shared/box' do |p| %>
8
- <% p.content_for :title do %>
9
- <%= t(".contexts.#{context.class.name.underscore}.header") %>
10
- <% end %>
11
-
12
- <% p.content_for :description do %>
13
- <%= t(".contexts.#{context.class.name.underscore}.description") %>
14
- <% end %>
7
+ <%= render 'account/shared/box' do |box| %>
8
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
9
+ <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
15
10
 
16
- <% p.content_for :table do %>
11
+ <% box.table do %>
17
12
  <% if collaborators.any? %>
18
13
  <table class="table">
19
14
  <thead>
@@ -53,7 +48,7 @@
53
48
  <% end %>
54
49
  <% end %>
55
50
 
56
- <% p.content_for :actions do %>
51
+ <% box.actions do %>
57
52
  <% unless hide_actions %>
58
53
  <% if context == creative_concept %>
59
54
  <% if can? :create, Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator.new(creative_concept: creative_concept) %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, current_team, :scaffolding_absolutely_abstract_creative_concepts_collaborators]),
4
4
  label: t('scaffolding/absolutely_abstract/creative_concepts/collaborators.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('scaffolding/absolutely_abstract/creative_concepts/collaborators.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', collaborator: @collaborator %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', collaborator: @collaborator %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', collaborators: @collaborators %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', collaborators: @collaborators %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', collaborator: @collaborator %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', collaborator: @collaborator %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,11 +1,10 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body do %>
4
+ <%= render 'account/shared/box', divider: true do |box| %>
5
+ <% box.t :description, title: '.header' %>
7
6
 
8
- <% p.content_for :body do %>
7
+ <% box.body do %>
9
8
  <%= render 'shared/attributes/belongs_to', object: @collaborator, attribute: :membership %>
10
9
  <%= render 'shared/attributes/attribute', object: @collaborator, attribute: :roles do %>
11
10
  <% if @collaborator.roles.present? %>
@@ -17,12 +16,11 @@
17
16
  <%# 🚅 super scaffolding will insert new fields above this line. %>
18
17
  <% end %>
19
18
 
20
- <% p.content_for :actions do %>
19
+ <% box.actions do %>
21
20
  <%= link_to t('.buttons.edit'), [:edit, :account, @collaborator], class: first_button_primary if can? :edit, @collaborator %>
22
21
  <%= button_to t('.buttons.destroy'), [:account, @collaborator], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@collaborator)) } if can? :destroy, @collaborator %>
23
22
  <%= link_to t('global.buttons.back'), [:account, @creative_concept, :collaborators], class: first_button_primary %>
24
23
  <% end %>
25
-
26
24
  <% end %>
27
25
 
28
26
  <%# 🚅 super scaffolding will insert new children above this line. %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', creative_concept: @creative_concept %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', creative_concept: @creative_concept %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', creative_concepts: @creative_concepts %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', creative_concepts: @creative_concepts %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', creative_concept: @creative_concept %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', creative_concept: @creative_concept %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,11 +1,10 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body do %>
4
4
  <%= updates_for @creative_concept do %>
5
- <%= render 'account/shared/box', divider: true do |p| %>
6
- <% p.content_for :title, t('.header') %>
7
- <% p.content_for :description, t('.description') %>
8
- <% p.content_for :body do %>
5
+ <%= render 'account/shared/box', divider: true do |box| %>
6
+ <% box.t :description, title: '.header' %>
7
+ <% box.body do %>
9
8
  <% with_attribute_settings object: @creative_concept, strategy: :label do %>
10
9
  <%= render 'shared/attributes/text', attribute: :name %>
11
10
  <%= render 'shared/attributes/text', attribute: :description %>
@@ -14,20 +13,16 @@
14
13
  <div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-3">
15
14
  <div class="sm:col-span-1">
16
15
  <%= render 'shared/attributes/base' do |p| %>
17
- <% p.content_for :heading, t(".fields.admins.heading") %>
18
- <% p.content_for :body do %>
19
- <%= render 'account/shared/memberships/photos', memberships: (@team.admins.reject(&:platform_agent?) + @creative_concept.admins.reject(&:platform_agent?)).uniq %>
20
- <% end %>
16
+ <% p.heading t(".fields.admins.heading") %>
17
+ <% p.body.render 'account/shared/memberships/photos', memberships: (@team.admins.reject(&:platform_agent?) + @creative_concept.admins.reject(&:platform_agent?)).uniq %>
21
18
  <% end %>
22
19
  </div>
23
20
 
24
21
  <% if @creative_concept.editors.any? %>
25
22
  <div class="sm:col-span-1">
26
23
  <%= render 'shared/attributes/base' do |p| %>
27
- <% p.content_for :heading, t(".fields.editors.heading") %>
28
- <% p.content_for :body do %>
29
- <%= render 'account/shared/memberships/photos', memberships: @creative_concept.editors.reject(&:platform_agent?) %>
30
- <% end %>
24
+ <% p.heading t(".fields.editors.heading") %>
25
+ <% p.body.render 'account/shared/memberships/photos', memberships: @creative_concept.editors.reject(&:platform_agent?) %>
31
26
  <% end %>
32
27
  </div>
33
28
  <% end %>
@@ -35,10 +30,8 @@
35
30
  <% if @creative_concept.viewers.any? %>
36
31
  <div class="sm:col-span-1">
37
32
  <%= render 'shared/attributes/base' do |p| %>
38
- <% p.content_for :heading, t(".fields.viewers.heading") %>
39
- <% p.content_for :body do %>
40
- <%= render 'account/shared/memberships/photos', memberships: @creative_concept.viewers.reject(&:platform_agent?) %>
41
- <% end %>
33
+ <% p.heading t(".fields.viewers.heading") %>
34
+ <% p.body.render 'account/shared/memberships/photos', memberships: @creative_concept.viewers.reject(&:platform_agent?) %>
42
35
  <% end %>
43
36
  </div>
44
37
  <% end %>
@@ -46,7 +39,7 @@
46
39
  <% end %>
47
40
  <% end %>
48
41
 
49
- <% p.content_for :actions do %>
42
+ <% box.actions do %>
50
43
  <%= link_to t('.buttons.edit'), [:edit, :account, @creative_concept], class: first_button_primary if can? :edit, @creative_concept %>
51
44
  <%= 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 %>
52
45
  <%= link_to t('global.buttons.back'), [:account, @team, :scaffolding_absolutely_abstract_creative_concepts], class: first_button_primary %>
@@ -10,14 +10,14 @@
10
10
 
11
11
  <%= action_model_select_controller do %>
12
12
  <% updates_for context, collection do %>
13
- <%= render 'account/shared/box', pagy: pagy do |p| %>
14
- <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %>
15
- <% p.content_for :description do %>
13
+ <%= render 'account/shared/box', pagy: pagy do |box| %>
14
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
15
+ <% box.description do %>
16
16
  <%= t(".contexts.#{context.class.name.underscore}.description#{"_empty" unless tangible_things.any?}") %>
17
17
  <%= render "shared/limits/index", model: tangible_things.model %>
18
18
  <% end %>
19
19
 
20
- <% p.content_for :table do %>
20
+ <% box.table do %>
21
21
  <% if tangible_things.any? %>
22
22
  <table class="table">
23
23
  <thead>
@@ -43,7 +43,7 @@
43
43
  <% end %>
44
44
  <% end %>
45
45
 
46
- <% p.content_for :actions do %>
46
+ <% box.actions do %>
47
47
  <% unless hide_actions %>
48
48
  <% if context == absolutely_abstract_creative_concept %>
49
49
  <% if can? :create, Scaffolding::CompletelyConcrete::TangibleThing.new(absolutely_abstract_creative_concept: absolutely_abstract_creative_concept) %>
@@ -61,7 +61,7 @@
61
61
  <% end %>
62
62
  <% end %>
63
63
 
64
- <% p.content_for :raw_footer do %>
64
+ <% box.raw_footer do %>
65
65
  <%# 🚅 super scaffolding will insert new action model index views above this line. %>
66
66
  <% end %>
67
67
  <% end %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, current_team, :scaffolding_completely_concrete_tangible_things]),
4
4
  label: t('scaffolding/completely_concrete/tangible_things.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('scaffolding/completely_concrete/tangible_things.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', tangible_thing: @tangible_thing %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', tangible_thing: @tangible_thing %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', tangible_things: @tangible_things %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', tangible_things: @tangible_things %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', tangible_thing: @tangible_thing %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', tangible_thing: @tangible_thing %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,15 +1,15 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body do %>
4
4
  <%= updates_for @tangible_thing do %>
5
- <%= render 'account/shared/box', divider: true do |p| %>
6
- <% p.content_for :title, t('.header') %>
7
- <% p.content_for :description do %>
5
+ <%= render 'account/shared/box', divider: true do |box| %>
6
+ <% box.title t('.header') %>
7
+ <% box.description do %>
8
8
  <%= t('.description') %>
9
9
  <%= t('.manage_description') if can? :manage, @tangible_thing %>
10
10
  <% end %>
11
11
 
12
- <% p.content_for :body do %>
12
+ <% box.body do %>
13
13
  <% with_attribute_settings object: @tangible_thing, strategy: :label do %>
14
14
  <%# 🚅 skip this section when scaffolding. %>
15
15
  <%= render 'shared/attributes/text', attribute: :text_field_value %>
@@ -34,14 +34,14 @@
34
34
  <% end %>
35
35
  <% end %>
36
36
 
37
- <% p.content_for :actions do %>
37
+ <% box.actions do %>
38
38
  <%= link_to t('.buttons.edit'), [:edit, :account, @tangible_thing], class: first_button_primary if can? :edit, @tangible_thing %>
39
39
  <%# 🚅 super scaffolding will insert new action model buttons above this line. %>
40
40
  <%= 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 %>
41
41
  <%= link_to t('global.buttons.back'), [:account, @absolutely_abstract_creative_concept, :completely_concrete_tangible_things], class: first_button_primary %>
42
42
  <% end %>
43
43
 
44
- <% p.content_for :raw_footer do %>
44
+ <% box.raw_footer do %>
45
45
  <%# 🚅 super scaffolding will insert new action model index views above this line. %>
46
46
  <% end %>
47
47
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.2.19"
3
+ VERSION = "1.2.21"
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ module Scaffolding::FileManipulator
23
23
  return false
24
24
  end
25
25
 
26
- if target_file_content.include?(content)
26
+ if options[:content_replacement_transformed] && target_file_content.include?(content)
27
27
  puts "No need to update '#{file}'. It already has '#{content}'."
28
28
  else
29
29
  puts "Updating '#{file}'." unless silence_logs?
@@ -192,7 +192,7 @@ class Scaffolding::Transformer
192
192
  # If the file exists in the application repository, we want to target it there.
193
193
  return file if File.exist?(file)
194
194
 
195
- ENV["OTHER_TARGETS"].split(",").each do |possible_target|
195
+ ENV["OTHER_TARGETS"]&.split(",")&.each do |possible_target|
196
196
  candidate_path = "#{possible_target}/#{file}".gsub("//", "/")
197
197
  return candidate_path if File.exist?(candidate_path)
198
198
  end
@@ -421,11 +421,13 @@ class Scaffolding::Transformer
421
421
  add_line_to_file(file, content, hook, options)
422
422
  end
423
423
 
424
- def scaffold_replace_line_in_file(file, content, in_place_of)
424
+ def scaffold_replace_line_in_file(file, content, content_to_replace)
425
425
  file = resolve_target_path(transform_string(file))
426
426
  # we specifically don't transform the content, we assume a builder function created this content.
427
- in_place_of = transform_string(in_place_of)
428
- Scaffolding::FileManipulator.replace_line_in_file(file, content, in_place_of, suppress_could_not_find: suppress_could_not_find)
427
+ transformed_content_to_replace = transform_string(content_to_replace)
428
+ content_replacement_transformed = content_to_replace != transformed_content_to_replace
429
+ options = {suppress_could_not_find: suppress_could_not_find, content_replacement_transformed: content_replacement_transformed}
430
+ Scaffolding::FileManipulator.replace_line_in_file(file, content, transformed_content_to_replace, **options)
429
431
  end
430
432
 
431
433
  # if class_name isn't specified, we use `child`.
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.2.19
4
+ version: 1.2.21
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-03-09 00:00:00.000000000 Z
11
+ date: 2023-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard