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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f389e5d57c307887cd26b84497c069efb40efe5
4
- data.tar.gz: 06b8ebccc7937f4e873e873e872fef41b0835adc
3
+ metadata.gz: bee5e0952b8280fbdfda03265483fc837e98c991
4
+ data.tar.gz: 4150dac2b430982da12689a38fcac903f37d5f54
5
5
  SHA512:
6
- metadata.gz: d129f88c55179a587b3811c2557b19f7b5dae20cc38d001643552ced2fbf3fe69d5dd5863cede731040065abaae4743c292ca0fe05ec50e7e009fe81247d49f3
7
- data.tar.gz: 5eea85a7f1650d925388dc14dc3feb86cf4ccaad1f9509e8ebab41c327ece2913c9288d98d2979ba46dc72b95cb475b06d8d63db7b9647b9ec444c4bedbf25ad
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].each do |value|
25
- str += "<input id=\"#{key}\" type=\"radio\" name=\"#{key}\" value=\"#{value}\" />#{value}"
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 " : "") +
@@ -1,3 +1,3 @@
1
1
  module JsonFormFields
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-02-24 00:00:00.000000000 Z
12
+ date: 2015-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler