client_side_validations-formtastic 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,5 +2,6 @@ module ClientSideValidations; end
2
2
 
3
3
  require 'formtastic'
4
4
  require 'client_side_validations/formtastic/form_builder'
5
+ require 'client_side_validations/formtastic/inputs'
5
6
  require 'client_side_validations/formtastic/helpers'
6
7
  require 'client_side_validations/formtastic/engine'
@@ -0,0 +1,7 @@
1
+ module ClientSideValidations::Formtastic::Inputs; end
2
+
3
+ ['boolean_input'].each do |input|
4
+ require "client_side_validations/formtastic/inputs/#{input}"
5
+ klass_name = input.camelcase
6
+ "Formtastic::Inputs::#{input.camelcase}".constantize.send(:include, "ClientSideValidations::Formtastic::Inputs::#{klass_name}".constantize)
7
+ end
@@ -0,0 +1,12 @@
1
+ module ClientSideValidations::Formtastic::Inputs::BooleanInput
2
+ def self.included(base)
3
+ base.class_eval do
4
+ alias_method_chain :check_box_html, :client_side_validations_formtastic
5
+ end
6
+ end
7
+
8
+ def check_box_html_with_client_side_validations_formtastic
9
+ builder.send(:build_validation_options, method, options)
10
+ check_box_html_without_client_side_validations_formtastic
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  module ClientSideValidations
2
2
  module Formtastic
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations-formtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-09 00:00:00.000000000 Z
12
+ date: 2012-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
@@ -169,6 +169,8 @@ files:
169
169
  - lib/client_side_validations/formtastic/form_builder.rb
170
170
  - lib/client_side_validations/formtastic/helpers.rb
171
171
  - lib/client_side_validations/formtastic/helpers/input_helper.rb
172
+ - lib/client_side_validations/formtastic/inputs.rb
173
+ - lib/client_side_validations/formtastic/inputs/boolean_input.rb
172
174
  - lib/client_side_validations/formtastic/version.rb
173
175
  - lib/client_side_validations/generators/formtastic.rb
174
176
  - vendor/assets/javascripts/rails.validations.formtastic.js
@@ -186,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
188
  version: '0'
187
189
  segments:
188
190
  - 0
189
- hash: 701556382062909177
191
+ hash: 3660073360903820453
190
192
  required_rubygems_version: !ruby/object:Gem::Requirement
191
193
  none: false
192
194
  requirements:
@@ -195,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
197
  version: '0'
196
198
  segments:
197
199
  - 0
198
- hash: 701556382062909177
200
+ hash: 3660073360903820453
199
201
  requirements: []
200
202
  rubyforge_project:
201
203
  rubygems_version: 1.8.23