bullet_train-super_scaffolding 1.2.20 → 1.2.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_index.html.erb +5 -5
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_menu_item.html.erb +1 -1
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_index.html.erb +5 -10
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_menu_item.html.erb +1 -1
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/edit.html.erb +5 -10
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/index.html.erb +3 -5
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/new.html.erb +5 -10
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/show.html.erb +7 -9
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/edit.html.erb +5 -10
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/index.html.erb +3 -5
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/new.html.erb +5 -10
- data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb +13 -20
- data/app/views/account/scaffolding/completely_concrete/tangible_things/_index.html.erb +6 -6
- data/app/views/account/scaffolding/completely_concrete/tangible_things/_menu_item.html.erb +1 -1
- data/app/views/account/scaffolding/completely_concrete/tangible_things/edit.html.erb +5 -10
- data/app/views/account/scaffolding/completely_concrete/tangible_things/index.html.erb +3 -5
- data/app/views/account/scaffolding/completely_concrete/tangible_things/new.html.erb +5 -10
- data/app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb +9 -9
- data/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/routes_file_manipulator.rb +3 -2
- data/lib/scaffolding/transformer.rb +18 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 626091dfa183016d4944a4708cd94b6378c28be9732b8b98e8b54ad167de115c
|
4
|
+
data.tar.gz: 353cb3c7e7d7b601235ed0cb2762e48303037c0af10fcefb9f200347ad2acab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba96da3da40d384c9f36ba1f257470640ba9b2c95303536b80ef670cc1144301595e1ebfb0c6d83a4b32748e05eb361dbbb65b947ec8c8ab0316f33dfeb426be
|
7
|
+
data.tar.gz: 3051a564684d6a8cd46268bdeacd58bfa821d83aa462d63f1a1154b3b0fc9e7bf52cb0b590c1d3c1bc6c95638781d216240bb0058a42a748e7c4616558cf02de
|
@@ -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 |
|
11
|
-
<%
|
12
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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" %>
|
data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_menu_item.html.erb
CHANGED
@@ -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.
|
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 |
|
8
|
-
<%
|
9
|
-
|
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
|
-
<%
|
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
|
-
<%
|
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.
|
6
|
+
<% p.icon do %>
|
7
7
|
<i class="<%= t('scaffolding/absolutely_abstract/creative_concepts/collaborators.navigation.icon') %>"></i>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/edit.html.erb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
|
-
<%= render 'account/shared/page' do |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
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 %>
|
data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/new.html.erb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
|
-
<%= render 'account/shared/page' do |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 %>
|
data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/show.html.erb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
<%= render 'account/shared/page' do |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
<%= render 'account/shared/box', divider: true do |
|
5
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
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 |
|
6
|
-
<%
|
7
|
-
<%
|
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.
|
18
|
-
<% p.
|
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.
|
28
|
-
<% p.
|
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.
|
39
|
-
<% p.
|
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
|
-
<%
|
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 |
|
14
|
-
<%
|
15
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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.
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
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 |
|
2
|
-
<%
|
3
|
-
<%
|
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 |
|
6
|
-
<%
|
7
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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
|
-
<%
|
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 %>
|
@@ -398,10 +398,11 @@ class Scaffolding::RoutesFileManipulator
|
|
398
398
|
existing_concerns.map! { |e| e.tr(":", "").tr("\"", "").squish&.to_sym }
|
399
399
|
existing_concerns.filter! { |e| e.present? }
|
400
400
|
existing_concerns << concern
|
401
|
+
existing_concerns.uniq!
|
401
402
|
if line.include?("concerns:")
|
402
403
|
lines[line_number].gsub!(/concerns: \[(.*)\]/, "concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}]")
|
403
|
-
elsif line.ends_with?(" do")
|
404
|
-
lines[line_number].gsub!(/ do$/, " concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}] do")
|
404
|
+
elsif line.squish.ends_with?(" do")
|
405
|
+
lines[line_number].gsub!(/ do$/, ", concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}] do")
|
405
406
|
else
|
406
407
|
lines[line_number].gsub!(/resources :(.*)$/, "resources :\\1, concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}]")
|
407
408
|
end
|
@@ -668,6 +668,18 @@ class Scaffolding::Transformer
|
|
668
668
|
type = parts.join(":")
|
669
669
|
boolean_buttons = type == "boolean"
|
670
670
|
|
671
|
+
if first_table_cell && ["trix_editor", "ckeditor", "text_area"].include?(type)
|
672
|
+
puts ""
|
673
|
+
puts "The first attribute of your model cannot be any of the following types:".red
|
674
|
+
puts "1. trix_editor"
|
675
|
+
puts "2. ckeditor"
|
676
|
+
puts "3. text_area"
|
677
|
+
puts ""
|
678
|
+
puts "Please ensure you have another attribute type as the first attribute for your model and try again."
|
679
|
+
|
680
|
+
exit
|
681
|
+
end
|
682
|
+
|
671
683
|
# extract any options they passed in with the field.
|
672
684
|
# will extract options declared with either [] or {}.
|
673
685
|
type, attribute_options = type.scan(/^(.*){(.*)}/).first || type
|
@@ -1523,6 +1535,12 @@ class Scaffolding::Transformer
|
|
1523
1535
|
unless cli_options["skip-model"]
|
1524
1536
|
scaffold_add_line_to_file("./app/models/scaffolding/completely_concrete/tangible_thing.rb", "def collection\n absolutely_abstract_creative_concept.completely_concrete_tangible_things\nend\n\n", METHODS_HOOK, prepend: true)
|
1525
1537
|
scaffold_add_line_to_file("./app/models/scaffolding/completely_concrete/tangible_thing.rb", "include Sortable\n", CONCERNS_HOOK, prepend: true)
|
1538
|
+
|
1539
|
+
migration = Dir.glob("db/migrate/*").last
|
1540
|
+
migration_lines = File.open(migration).readlines
|
1541
|
+
parent_line_idx = Scaffolding::FileManipulator.find(migration_lines, "t.references :#{parent.downcase}")
|
1542
|
+
new_lines = Scaffolding::BlockManipulator.insert_line("t.integer :sort_order", parent_line_idx, migration_lines, false)
|
1543
|
+
Scaffolding::FileManipulator.write(migration, new_lines)
|
1526
1544
|
end
|
1527
1545
|
|
1528
1546
|
unless cli_options["skip-table"]
|
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.
|
4
|
+
version: 1.2.22
|
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-
|
11
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.3.7
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Bullet Train Super Scaffolding
|