client_side_validations-formtastic 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.2.0'
3
+ VERSION = '2.2.1'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- Client Side Validations - Formtastic - v2.2.0.rc.2
3
+ Client Side Validations - Formtastic - v2.2.0
4
4
  https://github.com/dockyard/client_side_validations-formtastic
5
5
 
6
6
  Copyright (c) 2012 DockYard, LLC
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.2.0
4
+ version: 2.2.1
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
@@ -185,6 +185,8 @@ files:
185
185
  - lib/client_side_validations/formtastic/form_builder.rb
186
186
  - lib/client_side_validations/formtastic/helpers.rb
187
187
  - lib/client_side_validations/formtastic/helpers/input_helper.rb
188
+ - lib/client_side_validations/formtastic/inputs.rb
189
+ - lib/client_side_validations/formtastic/inputs/boolean_input.rb
188
190
  - lib/client_side_validations/formtastic/version.rb
189
191
  - lib/client_side_validations/generators/formtastic.rb
190
192
  - vendor/assets/javascripts/rails.validations.formtastic.js
@@ -202,7 +204,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
204
  version: '0'
203
205
  segments:
204
206
  - 0
205
- hash: -54854589160796829
207
+ hash: -4058815075651148052
206
208
  required_rubygems_version: !ruby/object:Gem::Requirement
207
209
  none: false
208
210
  requirements:
@@ -211,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
213
  version: '0'
212
214
  segments:
213
215
  - 0
214
- hash: -54854589160796829
216
+ hash: -4058815075651148052
215
217
  requirements: []
216
218
  rubyforge_project:
217
219
  rubygems_version: 1.8.23