vue-form-for 0.3.2 → 0.3.3

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: 7cfed9a785f58f2020654b8185875f61ace1deef
4
- data.tar.gz: 9f49c4fd722d81122b5db8373297e931fe1b2b61
3
+ metadata.gz: 7e654439d5253e0f40eb065267bcd4eac23e0f32
4
+ data.tar.gz: 92893a8ee0b699345526b520fb751957a2ca2e07
5
5
  SHA512:
6
- metadata.gz: 5f3a9ff3d169231c4269943a7f154cdb0213020d34bb346c213b12f7e25b6e7960440eb9f9be4d17f15187b681f715198c632a987c0bb96aeef4e9fef760e550
7
- data.tar.gz: d7c4e128b0d0328ddfb89f245be38fbda1303b21940e86011c5b09a3a5cf9c07db3546049c4b2dfef912718c0926b1263abebb5ed65afa8407ce2d4bc95b03ba
6
+ metadata.gz: 0cd57e5f9e6ec644993ac2a66fb423755ad3a355279dfe9fbff936893bd51e84bec3aed4657df84d130f34c32472310120ad0c7ed8df6cf5576b6b6658660690
7
+ data.tar.gz: 67e23b3bc0da0519bac7ebfeeec7e69a955a782742e4157e9cd6c5d3dcdcc02bf6c8e7fb4f59c591bd770a0a8f0e68bf74427f732a9360831a9386264f792aad
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG - vue-form-for
2
2
 
3
+ ## 0.3.3 (2017-05-09)
4
+
5
+ * Generate v-model attr for check boxes and radio buttons.
6
+
3
7
  ## 0.3.2 (2017-05-09)
4
8
 
5
9
  * Generate correct value for v-model on nested form.
@@ -23,11 +23,15 @@ module VueFormFor
23
23
 
24
24
  def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
25
25
  resolve_vue_options(options)
26
+ namespace = @object_name.gsub(/\[/, ".").gsub(/\]/, "")
27
+ options[:"v-model"] ||= "#{namespace}.#{method}"
26
28
  super(method, options, checked_value, unchecked_value)
27
29
  end
28
30
 
29
31
  def radio_button(method, tag_value, options = {})
30
32
  resolve_vue_options(options)
33
+ namespace = @object_name.gsub(/\[/, ".").gsub(/\]/, "")
34
+ options[:"v-model"] ||= "#{namespace}.#{method}"
31
35
  super(method, tag_value, options)
32
36
  end
33
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vue-form-for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsutomu KURODA