jquery-validator 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -38,9 +38,9 @@ Supported validations include:
38
38
 
39
39
  == Options
40
40
 
41
- You can pass a :fields argument to jquery_validations to only validate certain fields. All other options are converted to JSON and passed directly to the jquery validate() method. You can pass javascript functions as strings. For example
41
+ You can pass a :only argument to jquery_validations to only validate certain fields. All other options are converted to JSON and passed directly to the jquery validate() method. You can pass javascript functions as strings. For example
42
42
 
43
- <%= f.jquery_validators :fields => [:login, :email], :debug => true, :submitHandler => "function() { alert('Thank you!'); }" %>
43
+ <%= f.jquery_validators :only => [:login, :email], :debug => true, :submitHandler => "function() { alert('Thank you!'); }" %>
44
44
 
45
45
  If you want to be more unobtrusive, add
46
46
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jquery-validator}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mixtli"]
@@ -2,11 +2,9 @@ module ActionView
2
2
  module Helpers
3
3
  class FormBuilder
4
4
  def jquery_validators(options = {})
5
- fields = options.delete(:fields)
5
+ fields = options.delete(:only)
6
6
 
7
- Rails.logger.debug @object.class.validators.map(&:attributes)
8
7
  @object.class.validators.each do |v|
9
- Rails.logger.debug "doing validator #{v}"
10
8
  if !fields || fields.include?(v.attributes.first)
11
9
  if validator = JqueryValidator.factory(v, self)
12
10
  options.deep_merge!(JqueryValidator.factory(v, self).validate_arguments)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - mixtli