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.
- data/lib/client_side_validations/formtastic.rb +1 -0
- data/lib/client_side_validations/formtastic/inputs.rb +7 -0
- data/lib/client_side_validations/formtastic/inputs/boolean_input.rb +12 -0
- data/lib/client_side_validations/formtastic/version.rb +1 -1
- data/vendor/assets/javascripts/rails.validations.formtastic.js +1 -1
- metadata +6 -4
@@ -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
|
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.
|
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-
|
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: -
|
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: -
|
216
|
+
hash: -4058815075651148052
|
215
217
|
requirements: []
|
216
218
|
rubyforge_project:
|
217
219
|
rubygems_version: 1.8.23
|