client_side_validations 2.6.1 → 2.6.2

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/README.markdown CHANGED
@@ -39,7 +39,7 @@ This will copy client_side_validations.js to "public/javascripts"
39
39
  **This version of ClientSideValidations will also copy a patched version of jquery.validate.js to "public/javascript"**
40
40
 
41
41
  ### Rails 3
42
- Add "gem 'client_side_validations" to the Gemfile
42
+ Add "gem 'client_side_validations'" to the Gemfile
43
43
 
44
44
  Then run the generator:
45
45
  > rails g client_side_validations
@@ -37,28 +37,30 @@ if (typeof(jQuery) != "undefined") {
37
37
 
38
38
  $.extend($.fn, {
39
39
  clientSideValidations: function() {
40
- var form = this;
41
- var object = form.attr('object-csv');
42
- var form_id = form[0].id;
43
- var object_id = null;
44
- var adapter = 'jquery.validate';
40
+ for (var i in this) {
41
+ var form = $(this[i]);
42
+ var object = form.attr('object-csv');
43
+ var form_id = form.attr('id');
44
+ var object_id = null;
45
+ var adapter = 'jquery.validate';
45
46
 
46
- if (/edit/.test(form_id)) {
47
- object_id = /edit_\w+_(\d+)/.exec(form_id)[1];
48
- }
49
-
50
- if (eval("typeof(" + object + "_validation_options)") != "undefined") {
51
- var options = eval(object + '_validation_options');
52
- } else {
53
- var options = { }
47
+ if (/edit/.test(form_id)) {
48
+ object_id = /edit_\w+_(\d+)/.exec(form_id)[1];
49
+ }
50
+
51
+ if (eval("typeof(" + object + "_validation_options)") != "undefined") {
52
+ var options = eval(object + '_validation_options');
53
+ } else {
54
+ var options = { }
55
+ }
56
+ var client = new ClientSideValidations(object, adapter, object_id)
57
+ var rules = eval(object + '_validation_rules');
58
+ var validations = client.adaptValidations(rules);
59
+ options.rules = validations.rules;
60
+ options.messages = validations.messages;
61
+ options.ignore = ':hidden';
62
+ form.validate(options);
54
63
  }
55
- var client = new ClientSideValidations(object, adapter, object_id)
56
- var rules = eval(object + '_validation_rules');
57
- var validations = client.adaptValidations(rules);
58
- options.rules = validations.rules;
59
- options.messages = validations.messages;
60
- options.ignore = ':hidden';
61
- form.validate(options);
62
64
  }
63
65
  });
64
66
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease: false
5
6
  segments:
6
7
  - 2
7
8
  - 6
8
- - 1
9
- version: 2.6.1
9
+ - 2
10
+ version: 2.6.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Brian Cardarella
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-07-15 00:00:00 -04:00
18
+ date: 2010-07-22 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: validation_reflection-active_model
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 23
27
30
  segments:
28
31
  - 0
29
32
  - 2
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: json
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - "="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 1
41
46
  segments:
42
47
  - 1
43
48
  - 4
@@ -46,7 +51,7 @@ dependencies:
46
51
  type: :runtime
47
52
  version_requirements: *id002
48
53
  description: Client Side Validations for Rails 2.x and 3.x
49
- email: cardarellab@dnc.org
54
+ email: bcardarella@gmail.com
50
55
  executables: []
51
56
 
52
57
  extensions: []
@@ -54,7 +59,6 @@ extensions: []
54
59
  extra_rdoc_files:
55
60
  - LICENSE
56
61
  - README.markdown
57
- - TODO
58
62
  files:
59
63
  - LICENSE
60
64
  - README.markdown
@@ -68,7 +72,6 @@ files:
68
72
  - lib/client_side_validations/orm.rb
69
73
  - lib/client_side_validations/template.rb
70
74
  - lib/generators/client_side_validations_generator.rb
71
- - TODO
72
75
  has_rdoc: true
73
76
  homepage: http://github.com/dnclabs/client_side_validations
74
77
  licenses: []
@@ -79,23 +82,27 @@ rdoc_options:
79
82
  require_paths:
80
83
  - lib
81
84
  required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
82
86
  requirements:
83
87
  - - ">="
84
88
  - !ruby/object:Gem::Version
89
+ hash: 3
85
90
  segments:
86
91
  - 0
87
92
  version: "0"
88
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
+ none: false
89
95
  requirements:
90
96
  - - ">="
91
97
  - !ruby/object:Gem::Version
98
+ hash: 3
92
99
  segments:
93
100
  - 0
94
101
  version: "0"
95
102
  requirements: []
96
103
 
97
104
  rubyforge_project:
98
- rubygems_version: 1.3.6
105
+ rubygems_version: 1.3.7
99
106
  signing_key:
100
107
  specification_version: 3
101
108
  summary: Client Side Validations
data/TODO DELETED
@@ -1 +0,0 @@
1
- - Accept options in helper to extend the given validation plugin