json_form_fields 0.0.5 → 0.0.6

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: bee5e0952b8280fbdfda03265483fc837e98c991
4
- data.tar.gz: 4150dac2b430982da12689a38fcac903f37d5f54
3
+ metadata.gz: dbd0ce3d79a7a55957ea25312cc0f8cf179388a9
4
+ data.tar.gz: 3c6ae0013ebaee2d0d1f37a06efc848e82b056a7
5
5
  SHA512:
6
- metadata.gz: aff45e0ca8a48f3e2d6b46a6c7bc18b09955a3e2bdab94b64a709f48e93afd00e793e88b71956375b9bf00bd0f127b09630790e423c88c0d6473419fefab7a2b
7
- data.tar.gz: a52480c9eed3db4b880ce159a9311570cdcedbac6dcfd641a35bdefc26055d2dee339341bc62daa3508a9c3791c7a276620ebe932845ad78e7ac8ee5ca1f1157
6
+ metadata.gz: b0c495e48cac620ec8d15b9b04a05567d3b2bfb9677614810595baee294dcf3ae509b7cb5bc121b332cdaf21ebb4442b191f245de5bd00251662b89eea35d523
7
+ data.tar.gz: 3c67d8206169b0471d19a2075ce6fe23b0e1f57f2e6a0f77ec6511a891991398e0e2e405770afaf5d4f7dcb2064b2507645b61e94a22f61e656301f271e28d7d
data/README.md CHANGED
@@ -24,22 +24,7 @@ Or install it yourself as:
24
24
  JsonFormFields::Generator.generate_inputs({ method: ["GET", "POST"] })
25
25
  ```
26
26
  Will generate a select with GET and POST options. Works also with
27
- password, email and text inputs.
28
-
29
-
30
- You also can use the javascript generator in a Rails app, just add this to your application.js
31
-
32
- ```javascript
33
- //= require json_form_fields
34
- ```
35
-
36
- And use as follows and the script will get the JSON from the content
37
- of the input and will generate the inputs bellow:
38
-
39
- ```javascript
40
- $('.your_input_id_or_class').json_form_fields();
41
-
42
- ```
27
+ password, email, text inputs and so on.
43
28
 
44
29
  ## Contributing
45
30
 
@@ -1,3 +1,3 @@
1
1
  module JsonFormFields
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
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.5
4
+ version: 0.0.6
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-03-22 00:00:00.000000000 Z
12
+ date: 2015-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -66,7 +66,6 @@ files:
66
66
  - lib/json_form_fields.rb
67
67
  - lib/json_form_fields/generator.rb
68
68
  - lib/json_form_fields/version.rb
69
- - vendor/assets/javascripts/json_form_fields.js
70
69
  homepage: https://github.com/Lucasosf/json_form_fields
71
70
  licenses:
72
71
  - MIT
@@ -87,9 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
86
  version: '0'
88
87
  requirements: []
89
88
  rubyforge_project:
90
- rubygems_version: 2.2.2
89
+ rubygems_version: 2.4.5
91
90
  signing_key:
92
91
  specification_version: 4
93
92
  summary: A gem to write form fields from JSON documents
94
93
  test_files: []
95
- has_rdoc:
@@ -1,17 +0,0 @@
1
-
2
- $.fn.json_form_fields = function() {
3
- json = $.parseJSON('['+ this.val() +']');
4
- str = ''
5
-
6
- for(var key in json){
7
- if(json[key].constructor === Array){
8
- str += '<select id="'+key+'">';
9
- for(var option in json[key]){
10
- str += '<option value="'+option+'">'+key+'</option>';
11
- }
12
- str += '</select>';
13
- }else{
14
- str += '<input type="text" id="'+key+'" value="'+json[key]+'">'
15
- }
16
- }
17
- };