bullet_train-super_scaffolding 1.12.0 → 1.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/account/scaffolding/completely_concrete/tangible_things_controller.rb +1 -0
- data/app/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller.rb +1 -0
- data/app/views/account/scaffolding/completely_concrete/tangible_things/_form.html.erb +1 -0
- data/app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb +1 -0
- data/config/locales/en/scaffolding/completely_concrete/tangible_things.en.yml +7 -0
- data/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/attribute.rb +2 -2
- data/lib/scaffolding/script.rb +1 -0
- data/lib/scaffolding/transformer.rb +6 -4
- data/lib/scaffolding.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be0df510fd098c114487239ac00e69b54856df38cef8655d61316f8119c1d9ce
|
4
|
+
data.tar.gz: 0aec8526362652c9003780d54cd2245e5b137ececb2d162997588517f37e51c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87e04a49f198d65ea4c71f67641b59c68387a61dfd064cf30ac42cfa3f987f612ca5bd9db5d0569f407f4d177b1a12c52f0e0e5b74a7d4042165dba526d011b5
|
7
|
+
data.tar.gz: 313288579b1ccb287d0026c65d77d11da4b24527321719ddfb6f046b553ecd7b293666e140a1f0598a00e817c9eb848045091e835119eb6295fd67bdda7e1246
|
@@ -74,6 +74,7 @@ class Account::Scaffolding::CompletelyConcrete::TangibleThingsController < Accou
|
|
74
74
|
def process_params(strong_params)
|
75
75
|
# 🚅 skip this section when scaffolding.
|
76
76
|
assign_boolean(strong_params, :boolean_button_value)
|
77
|
+
assign_boolean(strong_params, :boolean_checkbox_value)
|
77
78
|
assign_checkboxes(strong_params, :multiple_button_values)
|
78
79
|
assign_checkboxes(strong_params, :multiple_option_values)
|
79
80
|
assign_select_options(strong_params, :multiple_super_select_values)
|
@@ -9,6 +9,7 @@
|
|
9
9
|
<%= render 'shared/fields/text_field', method: :text_field_value, options: {autofocus: true} %>
|
10
10
|
|
11
11
|
<%= render 'shared/fields/buttons', method: :boolean_button_value %>
|
12
|
+
<%= render 'shared/fields/checkbox', method: :boolean_checkbox_value %>
|
12
13
|
|
13
14
|
<div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-2">
|
14
15
|
<div class="sm:col-span-1">
|
@@ -14,6 +14,7 @@
|
|
14
14
|
<%# 🚅 skip this section when scaffolding. %>
|
15
15
|
<%= render 'shared/attributes/text', attribute: :text_field_value %>
|
16
16
|
<%= render 'shared/attributes/boolean', attribute: :boolean_button_value %>
|
17
|
+
<%= render 'shared/attributes/option', attribute: :boolean_checkbox_value %>
|
17
18
|
<%= render 'shared/attributes/option', attribute: :button_value %>
|
18
19
|
<%= render 'shared/attributes/options', attribute: :multiple_button_values %>
|
19
20
|
<%= render 'shared/attributes/code', attribute: :color_picker_value %>
|
@@ -53,6 +53,13 @@ en:
|
|
53
53
|
options:
|
54
54
|
true: "Yes"
|
55
55
|
false: "No"
|
56
|
+
boolean_checkbox_value:
|
57
|
+
_: &boolean_checkbox_value Boolean Checkbox Value
|
58
|
+
label: *boolean_checkbox_value
|
59
|
+
heading: *boolean_checkbox_value
|
60
|
+
options:
|
61
|
+
true: "Yes"
|
62
|
+
false: "No"
|
56
63
|
color_picker_value:
|
57
64
|
_: &color_picker_value Color Picker Value
|
58
65
|
label: *color_picker_value
|
@@ -93,7 +93,7 @@ class Scaffolding::Attribute
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def is_boolean?
|
96
|
-
original_type == "boolean"
|
96
|
+
original_type == "boolean" || original_type == "checkbox"
|
97
97
|
end
|
98
98
|
|
99
99
|
def file_field?
|
@@ -166,7 +166,7 @@ class Scaffolding::Attribute
|
|
166
166
|
case type
|
167
167
|
when "trix_editor", "ckeditor"
|
168
168
|
"html"
|
169
|
-
when "buttons", "super_select", "options", "boolean"
|
169
|
+
when "buttons", "super_select", "options", "boolean", "checkbox"
|
170
170
|
if is_ids?
|
171
171
|
"has_many"
|
172
172
|
elsif is_id?
|
data/lib/scaffolding/script.rb
CHANGED
@@ -835,8 +835,10 @@ class Scaffolding::Transformer
|
|
835
835
|
end
|
836
836
|
|
837
837
|
show_page_doesnt_exist = child == "User"
|
838
|
-
|
839
|
-
|
838
|
+
show_page_target = (child == "Membership") ?
|
839
|
+
"./app/views/account/scaffolding/completely_concrete/tangible_things/_attributes.html.erb" :
|
840
|
+
"./app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb"
|
841
|
+
scaffold_add_line_to_file(show_page_target, field_content.strip, ERB_NEW_FIELDS_HOOK, prepend: true, suppress_could_not_find: show_page_doesnt_exist)
|
840
842
|
end
|
841
843
|
|
842
844
|
#
|
@@ -848,7 +850,7 @@ class Scaffolding::Transformer
|
|
848
850
|
# table header.
|
849
851
|
field_content = "<th#{cell_attributes.present? ? " " + cell_attributes : ""}><%= t('.fields.#{attribute.is_vanilla? ? attribute.name : attribute.name_without_id_suffix}.heading') %></th>"
|
850
852
|
|
851
|
-
unless ["Team", "User"].include?(child)
|
853
|
+
unless ["Team", "User", "Membership"].include?(child)
|
852
854
|
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)
|
853
855
|
end
|
854
856
|
|
@@ -884,7 +886,7 @@ class Scaffolding::Transformer
|
|
884
886
|
field_content.gsub!(/\s%>/, ", one_line: true %>")
|
885
887
|
end
|
886
888
|
|
887
|
-
unless ["Team", "User"].include?(child)
|
889
|
+
unless ["Team", "User", "Membership"].include?(child)
|
888
890
|
scaffold_add_line_to_file("./app/views/account/scaffolding/completely_concrete/tangible_things/_tangible_thing.html.erb", field_content.strip, ERB_NEW_FIELDS_HOOK, prepend: true)
|
889
891
|
end
|
890
892
|
|
data/lib/scaffolding.rb
CHANGED
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.12.
|
4
|
+
version: 1.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|