vue-form-for 0.3.0 → 0.3.1

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: 7ff4d8f03077d4f157e9af9e0a343e2e0f12b898
4
- data.tar.gz: 4d02d6ac2c039a76dda446a390a5e210423031aa
3
+ metadata.gz: 015eb9f37a5a044a4cb60a65b638f588e7446e30
4
+ data.tar.gz: 4e1c4171f049ce653624f82972a50f3329e2a729
5
5
  SHA512:
6
- metadata.gz: e746e90c1769074d41384588ede2efe0fa2c0b0a9ee0837becdd209b6f5f3e8c8c00a341d837a90ac419a27a270b323743c5acce51e2fdb9b2fff1e691fd8f71
7
- data.tar.gz: 861d209014b22c59ecaa4e381508fbbeb0fe6573751a33cab5f6112e6d43d787423995073f3b23f48ff74629d63da3203ec1c03b03bba30e0909486c966c2ecc
6
+ metadata.gz: d0adfff9bf46564f92f033b55cf097ee21be9972239ba535f0cbeb32d7489f3b0461f12fb3eea468ffa21aa2998cb695640b1d9ddde42b14bff95886e0fd3b04
7
+ data.tar.gz: a28db07d57e26625897a69980667f498348c69ba00a7da031ee4a573a76949586e3db460d12506c825af1610498dcff65d223c0ec3451296a82ec72acc556c99
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG - vue-form-for
2
2
 
3
+ ## 0.3.1 (2017-04-11)
4
+
5
+ * Fix `check_box` and `radio_button` helper methods
6
+
3
7
  ## 0.3.0 (2017-04-09)
4
8
 
5
9
  * Add `vue_tag` and `vue_content_tag` helper methods
data/lib/vue-form-for.rb CHANGED
@@ -1,2 +1,2 @@
1
- require 'vue-form-for/form_builder'
2
- require 'vue-form-for/railtie'
1
+ require "vue-form-for/form_builder"
2
+ require "vue-form-for/railtie"
@@ -4,7 +4,8 @@ module VueFormFor
4
4
  class FormBuilder < ActionView::Helpers::FormBuilder
5
5
  include VueFormFor::VueOptionsResolver
6
6
 
7
- (field_helpers - [:label, :fields_for]).each do |selector|
7
+ (field_helpers - [:label, :check_box, :radio_button, :fields_for])
8
+ .each do |selector|
8
9
  class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
9
10
  def #{selector}(method, options = {})
10
11
  resolve_vue_options(options)
@@ -19,6 +20,16 @@ module VueFormFor
19
20
  super(method, text, options, &block)
20
21
  end
21
22
 
23
+ def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
24
+ resolve_vue_options(options)
25
+ super(method, options, checked_value, unchecked_value)
26
+ end
27
+
28
+ def radio_button(method, tag_value, options = {})
29
+ resolve_vue_options(options)
30
+ super(method, tag_value, options)
31
+ end
32
+
22
33
  def submit(value = nil, options = {})
23
34
  resolve_vue_options(options)
24
35
  super(value, options)
@@ -1,5 +1,5 @@
1
- require 'vue-form-for/form_helper'
2
- require 'vue-form-for/tag_helper'
1
+ require "vue-form-for/form_helper"
2
+ require "vue-form-for/tag_helper"
3
3
 
4
4
  module VueFormFor
5
5
  class Railtie < Rails::Railtie
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vue-form-for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsutomu KURODA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-09 00:00:00.000000000 Z
11
+ date: 2017-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview