json_form_fields 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_form_fields/generator.rb +6 -2
- data/lib/json_form_fields/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bee5e0952b8280fbdfda03265483fc837e98c991
|
4
|
+
data.tar.gz: 4150dac2b430982da12689a38fcac903f37d5f54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aff45e0ca8a48f3e2d6b46a6c7bc18b09955a3e2bdab94b64a709f48e93afd00e793e88b71956375b9bf00bd0f127b09630790e423c88c0d6473419fefab7a2b
|
7
|
+
data.tar.gz: a52480c9eed3db4b880ce159a9311570cdcedbac6dcfd641a35bdefc26055d2dee339341bc62daa3508a9c3791c7a276620ebe932845ad78e7ac8ee5ca1f1157
|
@@ -21,8 +21,12 @@ module JsonFormFields
|
|
21
21
|
"value=\"#{value}\" />#{value}"
|
22
22
|
end
|
23
23
|
elsif json[key].delete "_radio"
|
24
|
-
json[key].
|
25
|
-
str += "<input id=\"#{key}\" type=\"
|
24
|
+
if json[key].delete "_boolean"
|
25
|
+
str += "<input id=\"#{key}\" type=\"hidden\" name=\"#{key}\" value=\"0\" /><input id=\"#{key}\" type=\"radio\" name=\"#{key}\" value=\"1\" />"
|
26
|
+
else
|
27
|
+
json[key].each do |value|
|
28
|
+
str += "<input id=\"#{key}\" type=\"radio\" name=\"#{key}\" value=\"#{value}\" />#{value}"
|
29
|
+
end
|
26
30
|
end
|
27
31
|
else
|
28
32
|
str += "<select name=\"#{key}\" " + (multiple ? "multiple " : "") +
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_form_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Oliveira
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|