formnestic 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/formnestic.gemspec +1 -1
- data/lib/formnestic/form_builder/table_form_builder.rb +1 -1
- data/lib/formnestic/inputs/base/wrapping.rb +43 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3dd0bc0425d77a4cd8462fca70aa96a62ce58074501803e19c99d5b502f89b4a
|
4
|
+
data.tar.gz: 74dbbfd7b390e44634908d16b8a6cf6361732af0e518970bb6397de064394e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4c62189e490379215453b77c315ddcbf262ec91ee9877287ef56e30a6703fbb20dc4f42e30265f2e9da285db2647d6da2066e5dd181ea204b14ba9a0571a6f3
|
7
|
+
data.tar.gz: 3810b3d89604978d062945906a23666981bcc91930aee605200e8bc7408d316b3bc6e571a8ee90ace290f81586ba939ce07aa7411ea23b640670d966a94c33ac
|
data/formnestic.gemspec
CHANGED
@@ -1,9 +1,31 @@
|
|
1
|
+
# rubocop:disable MethodLength, AbcSize
|
1
2
|
module Formnestic
|
2
3
|
module Inputs
|
3
4
|
module Base
|
4
5
|
module Wrapping
|
6
|
+
def table_builder?
|
7
|
+
builder.options[:display_type] == 'table' ||
|
8
|
+
if builder.options[:parent_builder]
|
9
|
+
builder
|
10
|
+
.options[:parent_builder]
|
11
|
+
.options[:display_type] == 'table'
|
12
|
+
else
|
13
|
+
false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def parent_table_builder?
|
18
|
+
if builder.options[:parent_builder]
|
19
|
+
builder
|
20
|
+
.options[:parent_builder]
|
21
|
+
.options[:display_type] == 'table'
|
22
|
+
else
|
23
|
+
false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
5
27
|
def input_wrapping(&block)
|
6
|
-
if
|
28
|
+
if table_builder?
|
7
29
|
if [
|
8
30
|
'Formtastic::Inputs::DateSelectInput',
|
9
31
|
'Formtastic::Inputs::TimeSelectInput',
|
@@ -21,13 +43,16 @@ module Formnestic
|
|
21
43
|
end
|
22
44
|
|
23
45
|
def table_date_select_input_wrapping(&block)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
46
|
+
unless parent_table_builder?
|
47
|
+
builder
|
48
|
+
.options[:parent_builder]
|
49
|
+
.add_table_header(
|
50
|
+
attributized_method_name,
|
51
|
+
self.class,
|
52
|
+
label_text
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
31
56
|
template.content_tag(
|
32
57
|
:td,
|
33
58
|
template.content_tag(
|
@@ -40,13 +65,15 @@ module Formnestic
|
|
40
65
|
end
|
41
66
|
|
42
67
|
def table_input_wrapping(&block)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
68
|
+
unless parent_table_builder?
|
69
|
+
builder
|
70
|
+
.options[:parent_builder]
|
71
|
+
.add_table_header(
|
72
|
+
attributized_method_name,
|
73
|
+
self.class,
|
74
|
+
label_text
|
75
|
+
)
|
76
|
+
end
|
50
77
|
|
51
78
|
template.content_tag(
|
52
79
|
:td,
|
@@ -62,3 +89,4 @@ module Formnestic
|
|
62
89
|
end
|
63
90
|
end
|
64
91
|
end
|
92
|
+
# rubocop:enable MethodLength, AbcSize
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formnestic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.6
|
241
|
+
rubygems_version: 2.7.6
|
242
242
|
signing_key:
|
243
243
|
specification_version: 3
|
244
244
|
summary: An extension of formtastic form builder gem
|