dynamic_scaffold 1.2.2 → 1.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cc7a47fdf21680556c682f4e595861cbe3a3d8791328fffa7035cd0a171d7fa
|
4
|
+
data.tar.gz: ebcfd2e48af4267a087df753ebe571112d84c3c3702fe0fd7a66cec4a36e111a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cd01e3b4e60bf76c3dfc8f3fa54f37c774a50eeeeaf1661ed31ab4b2af408029b33b5844fc458ae743d0429b5a0b843f00d436ce07b584445030f98c225d833
|
7
|
+
data.tar.gz: 357e00ab95e8522d7f6628182ef62c3cdf1e0842f30f42fbd5c30081654abaf109793f12d5578018168b5706a957b8631be1dfc472e33dc3d8f5548305d83606
|
data/README.md
CHANGED
@@ -276,16 +276,12 @@ class ShopController < ApplicationController
|
|
276
276
|
|
277
277
|
# You can also add a note to the form field.
|
278
278
|
config.form.item(:text_field, :name).note do
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
out << 'laboris nisi ut aliquip ex ea commodo consequat. '
|
286
|
-
out << tag(:br)
|
287
|
-
safe_join(out)
|
288
|
-
end
|
279
|
+
concat(tag.p do
|
280
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, '
|
281
|
+
end)
|
282
|
+
concat(tag.p do
|
283
|
+
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
|
284
|
+
end)
|
289
285
|
end
|
290
286
|
end
|
291
287
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_with method: method, model: @record, url: url, local: true do |form| %>
|
1
|
+
<%= form_with method: method, model: @record, url: url, local: true, class: 'ds-form' do |form| %>
|
2
2
|
<%-dynamic_scaffold.form.items.each do |elem|-%>
|
3
3
|
<%= render 'dynamic_scaffold/bootstrap/form/row', form: form, elem: elem, depth: 0 %>
|
4
4
|
<% end %>
|
@@ -68,11 +68,18 @@ module DynamicScaffold
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def render_label(view, depth)
|
71
|
+
label_attrs = @label_attributes.dup
|
72
|
+
if label_attrs[:class].present?
|
73
|
+
label_attrs[:class] = "ds-label #{label_attrs[:class]}"
|
74
|
+
else
|
75
|
+
label_attrs[:class] = 'ds-label'
|
76
|
+
end
|
77
|
+
|
71
78
|
if @label_block.present?
|
72
79
|
label = view.instance_exec(
|
73
80
|
proxy_field.label,
|
74
81
|
depth,
|
75
|
-
|
82
|
+
label_attrs,
|
76
83
|
&@label_block
|
77
84
|
)
|
78
85
|
return label unless label.nil?
|
@@ -82,13 +89,13 @@ module DynamicScaffold
|
|
82
89
|
# label = view.instance_exec(
|
83
90
|
# proxy_field.label,
|
84
91
|
# depth,
|
85
|
-
#
|
92
|
+
# label_attrs,
|
86
93
|
# &DynamicScaffold.config.form.label
|
87
94
|
# )
|
88
95
|
# return label unless label.nil?
|
89
96
|
# end
|
90
97
|
|
91
|
-
view.tag.label(proxy_field.label,
|
98
|
+
view.tag.label(proxy_field.label, label_attrs)
|
92
99
|
end
|
93
100
|
|
94
101
|
def extract_parameters(permitting)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masamoto Miyata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: classnames-rails-view
|