whyvalidationssuckin96 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/README.md +6 -2
  2. data/VERSION +1 -1
  3. data/doc/ActiveRecord/RecordInvalid.html +12 -12
  4. data/doc/ActiveRecord.html +3 -3
  5. data/doc/FalseClass.html +2 -2
  6. data/doc/NilClass.html +2 -2
  7. data/doc/Numeric.html +2 -2
  8. data/doc/Object.html +2 -2
  9. data/doc/String.html +2 -2
  10. data/doc/TrueClass.html +2 -2
  11. data/doc/WhyValidationsSuckIn96/ActiveRecord/AssociationValidation/ClassMethods.html +221 -0
  12. data/doc/WhyValidationsSuckIn96/ActiveRecord/AssociationValidation.html +166 -0
  13. data/doc/WhyValidationsSuckIn96/ActiveRecord/ClassMethods.html +166 -0
  14. data/doc/WhyValidationsSuckIn96/ActiveRecord/InstanceMethods.html +9 -9
  15. data/doc/WhyValidationsSuckIn96/ActiveRecord.html +90 -7
  16. data/doc/WhyValidationsSuckIn96/AttributeBasedValidation.html +2 -2
  17. data/doc/WhyValidationsSuckIn96/SkippableValidation.html +2 -2
  18. data/doc/WhyValidationsSuckIn96/ValidatesAcceptance.html +4 -4
  19. data/doc/WhyValidationsSuckIn96/ValidatesAssociated.html +2 -2
  20. data/doc/WhyValidationsSuckIn96/ValidatesConfirmation.html +2 -2
  21. data/doc/WhyValidationsSuckIn96/ValidatesExclusion.html +2 -2
  22. data/doc/WhyValidationsSuckIn96/ValidatesFormat.html +2 -2
  23. data/doc/WhyValidationsSuckIn96/ValidatesInclusion.html +2 -2
  24. data/doc/WhyValidationsSuckIn96/ValidatesLength.html +2 -2
  25. data/doc/WhyValidationsSuckIn96/ValidatesNumericality.html +2 -2
  26. data/doc/WhyValidationsSuckIn96/ValidatesPresence.html +2 -2
  27. data/doc/WhyValidationsSuckIn96/ValidatesUniqueness.html +2 -2
  28. data/doc/WhyValidationsSuckIn96/ValidatesUrl.html +2 -2
  29. data/doc/WhyValidationsSuckIn96/Validation.html +2 -2
  30. data/doc/WhyValidationsSuckIn96/ValidationBuilder.html +2 -2
  31. data/doc/WhyValidationsSuckIn96/ValidationSupport/ClassMethods.html +2 -2
  32. data/doc/WhyValidationsSuckIn96/ValidationSupport/InstanceMethods.html +2 -2
  33. data/doc/WhyValidationsSuckIn96/ValidationSupport.html +2 -2
  34. data/doc/WhyValidationsSuckIn96.html +3 -3
  35. data/doc/_index.html +30 -9
  36. data/doc/class_list.html +59 -29
  37. data/doc/file.README.html +9 -5
  38. data/doc/index.html +9 -5
  39. data/doc/method_list.html +104 -54
  40. data/doc/top-level-namespace.html +2 -2
  41. data/lib/whyvalidationssuckin96/macros/validates_length.rb +1 -0
  42. data/test/macros/validates_length_test.rb +5 -0
  43. data/whyvalidationssuckin96.gemspec +5 -2
  44. metadata +5 -2
@@ -0,0 +1,166 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>Module: WhyValidationsSuckIn96::ActiveRecord::ClassMethods</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <div id="header">
20
+ <div id="menu">
21
+
22
+ <a href="../../_index.html">Index (C)</a> &raquo;
23
+ <a href="../../WhyValidationsSuckIn96.html" title="WhyValidationsSuckIn96">WhyValidationsSuckIn96</a> &raquo; <a href="../ActiveRecord.html" title="ActiveRecord">ActiveRecord</a>
24
+ &raquo;
25
+ <span class="title">ClassMethods</span>
26
+
27
+ </div>
28
+
29
+ <div id="search">
30
+ <a id="class_list_link" href="#">Namespace List</a>
31
+ <a id="method_list_link" href="#">Method List</a>
32
+ <a id ="file_list_link" href="#">File List</a>
33
+ </div>
34
+
35
+ <div class="clear"></div>
36
+ </div>
37
+
38
+ <iframe id="search_frame"></iframe>
39
+
40
+ <div id="content"><h1>Module: WhyValidationsSuckIn96::ActiveRecord::ClassMethods
41
+
42
+
43
+ </h1>
44
+
45
+ <dl class="box">
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+ <dt class="r1 last">Defined in:</dt>
54
+ <dd class="r1 last">lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb</dd>
55
+
56
+ </dl>
57
+ <div class="clear"></div>
58
+
59
+ <h2>Overview</h2><div class="docstring">
60
+ <div class="discussion">
61
+ <p>
62
+ ClassMethods
63
+ </p>
64
+
65
+
66
+ </div>
67
+ </div>
68
+ <div class="tags">
69
+
70
+ </div>
71
+
72
+
73
+ <h2>Instance Method Summary</h2>
74
+
75
+ <ul class="summary">
76
+
77
+ <li class="public ">
78
+ <span class="summary_signature">
79
+
80
+ <a href="#validate-instance_method" title="#validate (instance method)">- (Object) <strong>validate</strong>(*args) </a>
81
+
82
+
83
+
84
+ </span>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <span class="summary_desc">
93
+ FIXME - this is a seedy hack and i blame the entire contents of
94
+ active_record/autosave_association.rb for it being necessary.
95
+
96
+ </span>
97
+
98
+ </li>
99
+
100
+
101
+ </ul>
102
+
103
+
104
+ <div id="instance_method_details" class="method_details_list">
105
+ <h2>Instance Method Details</h2>
106
+
107
+
108
+ <div class="method_details first">
109
+ <p class="signature first" id="validate-instance_method">
110
+
111
+ - (<tt><a href="../../Object.html" title="Object">Object</a></tt>) <strong>validate</strong>(*args)
112
+
113
+
114
+
115
+ </p><div class="docstring">
116
+ <div class="discussion">
117
+ <p>
118
+ FIXME - this is a seedy hack and i blame the entire contents of
119
+ active_record/autosave_association.rb for it being necessary.
120
+ </p>
121
+
122
+
123
+ </div>
124
+ </div>
125
+ <div class="tags">
126
+
127
+ </div><table class="source_code">
128
+ <tr>
129
+ <td>
130
+ <pre class="lines">
131
+
132
+
133
+ 48
134
+ 49
135
+ 50
136
+ 51
137
+ 52
138
+ 53</pre>
139
+ </td>
140
+ <td>
141
+ <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb', line 48</span>
142
+
143
+ <span class='def def kw'>def</span> <span class='validate identifier id'>validate</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='rparen token'>)</span>
144
+ <span class='return return kw'>return</span> <span class='false false kw'>false</span> <span class='unless unless_mod kw'>unless</span> <span class='WhyValidationsSuckIn96 constant id'>WhyValidationsSuckIn96</span><span class='colon2 op'>::</span><span class='ActiveRecord constant id'>ActiveRecord</span><span class='dot token'>.</span><span class='warn_on_deprecation identifier id'>warn_on_deprecation</span>
145
+ <span class='callstack identifier id'>callstack</span> <span class='assign token'>=</span> <span class='caller identifier id'>caller</span>
146
+ <span class='warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;This is a friendly message from WhyValidationsSuckIn96. \#{self.inspect} called 'validate' which is a\ndeprecated method. The arguments given were:\n\n\#{args.inspect} - \#{block_given? ? 'block given' : 'no block given'}\n\nand the caller was:\n\n\#{callstack.first}\n\nIf these warnings are coming from a call to 'add_autosave_association_callbacks', do not be alarmed, as\nWhyValidationsSuckIn96 has implemented its own versions of the necessary validation callbacks.\n\nThese warnings can be silenced by setting 'WhyValidationsSuckIn96::ActiveRecord.warn_on_deprecation' to false.\nYou will now be returned to your regularly scheduled programming.\n&quot;</span><span class='dot token'>.</span><span class='gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/^\s{10}/</span><span class='comma token'>,</span> <span class='string val'>&quot;&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
147
+ <span class='false false kw'>false</span>
148
+ <span class='end end kw'>end</span>
149
+ </pre>
150
+ </td>
151
+ </tr>
152
+ </table>
153
+ </div>
154
+
155
+ </div>
156
+
157
+ </div>
158
+
159
+ <div id="footer">
160
+ Generated on Mon Dec 21 23:30:37 2009 by
161
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
162
+ 0.5.2 (ruby-1.8.7).
163
+ </div>
164
+
165
+ </body>
166
+ </html>
@@ -51,7 +51,7 @@
51
51
 
52
52
 
53
53
  <dt class="r1 last">Defined in:</dt>
54
- <dd class="r1 last">lib/whyvalidationssuckin96/rails/active_record.rb</dd>
54
+ <dd class="r1 last">lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb</dd>
55
55
 
56
56
  </dl>
57
57
  <div class="clear"></div>
@@ -122,14 +122,14 @@ InstanceMethods
122
122
  <pre class="lines">
123
123
 
124
124
 
125
- 44
126
- 45
127
- 46
128
- 47
129
- 48</pre>
125
+ 75
126
+ 76
127
+ 77
128
+ 78
129
+ 79</pre>
130
130
  </td>
131
131
  <td>
132
- <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record.rb', line 44</span>
132
+ <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb', line 75</span>
133
133
 
134
134
  <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='included identifier id'>included</span><span class='lparen token'>(</span><span class='klass_or_mod identifier id'>klass_or_mod</span><span class='rparen token'>)</span>
135
135
  <span class='klass_or_mod identifier id'>klass_or_mod</span><span class='dot token'>.</span><span class='module_eval identifier id'>module_eval</span> <span class='do do kw'>do</span>
@@ -147,9 +147,9 @@ InstanceMethods
147
147
  </div>
148
148
 
149
149
  <div id="footer">
150
- Generated on Mon Dec 21 16:56:20 2009 by
150
+ Generated on Mon Dec 21 23:30:36 2009 by
151
151
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
152
- 0.5.0 (ruby-1.8.7).
152
+ 0.5.2 (ruby-1.8.7).
153
153
  </div>
154
154
 
155
155
  </body>
@@ -51,7 +51,9 @@
51
51
 
52
52
 
53
53
  <dt class="r1 last">Defined in:</dt>
54
- <dd class="r1 last">lib/whyvalidationssuckin96/rails/active_record.rb</dd>
54
+ <dd class="r1 last">lib/whyvalidationssuckin96/rails/active_record/association_validation.rb<span class="defines">,<br />
55
+ lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb</span>
56
+ </dd>
55
57
 
56
58
  </dl>
57
59
  <div class="clear"></div>
@@ -71,7 +73,7 @@ ActiveRecord
71
73
  <p class="children">
72
74
 
73
75
 
74
- <strong class="modules">Modules:</strong> <a href="ActiveRecord/InstanceMethods.html" title="InstanceMethods">InstanceMethods</a>
76
+ <strong class="modules">Modules:</strong> <a href="ActiveRecord/AssociationValidation.html" title="AssociationValidation">AssociationValidation</a>, <a href="ActiveRecord/ClassMethods.html" title="ClassMethods">ClassMethods</a>, <a href="ActiveRecord/InstanceMethods.html" title="InstanceMethods">InstanceMethods</a>
75
77
 
76
78
 
77
79
 
@@ -101,6 +103,37 @@ validates_numericality_of validates_presence_of validates_length_of]</span>
101
103
 
102
104
 
103
105
 
106
+ <h2>Class Attribute Summary</h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#warn_on_deprecation-class_method" title="warn_on_deprecation (class method)">+ (Object) <strong>warn_on_deprecation</strong> </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ <span class="summary_desc">
128
+ Returns the value of attribute warn_on_deprecation.
129
+
130
+ </span>
131
+
132
+ </li>
133
+
134
+
135
+ </ul>
136
+
104
137
 
105
138
  <h2>Class Method Summary</h2>
106
139
 
@@ -128,6 +161,54 @@ validates_numericality_of validates_presence_of validates_length_of]</span>
128
161
 
129
162
  </ul>
130
163
 
164
+ <div id="class_attr_details" class="attr_details">
165
+ <h2>Class Attribute Details</h2>
166
+
167
+
168
+ <span id="warn_on_deprecation=-class_method"></span>
169
+ <span id="warn_on_deprecation-class_method"></span>
170
+ <div class="method_details first">
171
+ <p class="signature first" id="warn_on_deprecation-class_method">
172
+
173
+ + (<tt><a href="../Object.html" title="Object">Object</a></tt>) <strong>warn_on_deprecation</strong>
174
+
175
+
176
+
177
+ </p><div class="docstring">
178
+ <div class="discussion">
179
+ <p>
180
+ Returns the value of attribute warn_on_deprecation
181
+ </p>
182
+
183
+
184
+ </div>
185
+ </div>
186
+ <div class="tags">
187
+
188
+ </div><table class="source_code">
189
+ <tr>
190
+ <td>
191
+ <pre class="lines">
192
+
193
+
194
+ 7
195
+ 8
196
+ 9</pre>
197
+ </td>
198
+ <td>
199
+ <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb', line 7</span>
200
+
201
+ <span class='def def kw'>def</span> <span class='warn_on_deprecation identifier id'>warn_on_deprecation</span>
202
+ <span class='@warn_on_deprecation ivar id'>@warn_on_deprecation</span>
203
+ <span class='end end kw'>end</span>
204
+ </pre>
205
+ </td>
206
+ </tr>
207
+ </table>
208
+ </div>
209
+
210
+ </div>
211
+
131
212
 
132
213
  <div id="class_method_details" class="method_details_list">
133
214
  <h2>Class Method Details</h2>
@@ -154,22 +235,24 @@ validates_numericality_of validates_presence_of validates_length_of]</span>
154
235
  <pre class="lines">
155
236
 
156
237
 
157
- 16
158
238
  17
159
239
  18
160
240
  19
161
241
  20
162
242
  21
163
- 22</pre>
243
+ 22
244
+ 23
245
+ 24</pre>
164
246
  </td>
165
247
  <td>
166
- <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record.rb', line 16</span>
248
+ <pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/rails/active_record/base_validation_overrides.rb', line 17</span>
167
249
 
168
250
  <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='included identifier id'>included</span><span class='lparen token'>(</span><span class='klass_or_mod identifier id'>klass_or_mod</span><span class='rparen token'>)</span>
169
251
  <span class='remove_active_record_validation_related_methods_from identifier id'>remove_active_record_validation_related_methods_from</span><span class='lparen token'>(</span><span class='klass_or_mod identifier id'>klass_or_mod</span><span class='rparen token'>)</span>
170
252
  <span class='klass_or_mod identifier id'>klass_or_mod</span><span class='dot token'>.</span><span class='instance_eval identifier id'>instance_eval</span> <span class='do do kw'>do</span>
171
253
  <span class='include identifier id'>include</span> <span class='WhyValidationsSuckIn96 constant id'>WhyValidationsSuckIn96</span><span class='colon2 op'>::</span><span class='ValidationSupport constant id'>ValidationSupport</span>
172
254
  <span class='include identifier id'>include</span> <span class='WhyValidationsSuckIn96 constant id'>WhyValidationsSuckIn96</span><span class='colon2 op'>::</span><span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='InstanceMethods constant id'>InstanceMethods</span>
255
+ <span class='extend identifier id'>extend</span> <span class='WhyValidationsSuckIn96 constant id'>WhyValidationsSuckIn96</span><span class='colon2 op'>::</span><span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='ClassMethods constant id'>ClassMethods</span>
173
256
  <span class='end end kw'>end</span>
174
257
  <span class='end end kw'>end</span>
175
258
  </pre>
@@ -183,9 +266,9 @@ validates_numericality_of validates_presence_of validates_length_of]</span>
183
266
  </div>
184
267
 
185
268
  <div id="footer">
186
- Generated on Mon Dec 21 16:56:21 2009 by
269
+ Generated on Mon Dec 21 23:30:36 2009 by
187
270
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
188
- 0.5.0 (ruby-1.8.7).
271
+ 0.5.2 (ruby-1.8.7).
189
272
  </div>
190
273
 
191
274
  </body>
@@ -455,9 +455,9 @@ values if :allow_nil or :allow_blank have been set.
455
455
  </div>
456
456
 
457
457
  <div id="footer">
458
- Generated on Mon Dec 21 16:56:22 2009 by
458
+ Generated on Mon Dec 21 23:30:36 2009 by
459
459
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
460
- 0.5.0 (ruby-1.8.7).
460
+ 0.5.2 (ruby-1.8.7).
461
461
  </div>
462
462
 
463
463
  </body>
@@ -185,9 +185,9 @@ Validate unless a given method on the validatable object returns true
185
185
  </div>
186
186
 
187
187
  <div id="footer">
188
- Generated on Mon Dec 21 16:56:20 2009 by
188
+ Generated on Mon Dec 21 23:30:36 2009 by
189
189
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
190
- 0.5.0 (ruby-1.8.7).
190
+ 0.5.2 (ruby-1.8.7).
191
191
  </div>
192
192
 
193
193
  </body>
@@ -80,8 +80,8 @@
80
80
  <h2>Overview</h2><div class="docstring">
81
81
  <div class="discussion">
82
82
  <p>
83
- Validates the acceptance of an attribute, such as the &#8220;I agree to the
84
- terms and conditions&#8221; checkbox value returned by a form post.
83
+ Validates the acceptance of an attribute, such as the &quot;I agree to the
84
+ terms and conditions&quot; checkbox value returned by a form post.
85
85
  </p>
86
86
 
87
87
 
@@ -245,9 +245,9 @@ Changing the :accept value
245
245
  </div>
246
246
 
247
247
  <div id="footer">
248
- Generated on Mon Dec 21 16:56:21 2009 by
248
+ Generated on Mon Dec 21 23:30:35 2009 by
249
249
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
250
- 0.5.0 (ruby-1.8.7).
250
+ 0.5.2 (ruby-1.8.7).
251
251
  </div>
252
252
 
253
253
  </body>
@@ -241,9 +241,9 @@ Checking the validity of an associated artist
241
241
  </div>
242
242
 
243
243
  <div id="footer">
244
- Generated on Mon Dec 21 16:56:21 2009 by
244
+ Generated on Mon Dec 21 23:30:37 2009 by
245
245
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
246
- 0.5.0 (ruby-1.8.7).
246
+ 0.5.2 (ruby-1.8.7).
247
247
  </div>
248
248
 
249
249
  </body>
@@ -242,9 +242,9 @@ Default usage
242
242
  </div>
243
243
 
244
244
  <div id="footer">
245
- Generated on Mon Dec 21 16:56:21 2009 by
245
+ Generated on Mon Dec 21 23:30:36 2009 by
246
246
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
247
- 0.5.0 (ruby-1.8.7).
247
+ 0.5.2 (ruby-1.8.7).
248
248
  </div>
249
249
 
250
250
  </body>
@@ -379,9 +379,9 @@ A collection to check against for exclusion.
379
379
  </div>
380
380
 
381
381
  <div id="footer">
382
- Generated on Mon Dec 21 16:56:20 2009 by
382
+ Generated on Mon Dec 21 23:30:36 2009 by
383
383
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
384
- 0.5.0 (ruby-1.8.7).
384
+ 0.5.2 (ruby-1.8.7).
385
385
  </div>
386
386
 
387
387
  </body>
@@ -378,9 +378,9 @@ A regular expression to check against
378
378
  </div>
379
379
 
380
380
  <div id="footer">
381
- Generated on Mon Dec 21 16:56:21 2009 by
381
+ Generated on Mon Dec 21 23:30:36 2009 by
382
382
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
383
- 0.5.0 (ruby-1.8.7).
383
+ 0.5.2 (ruby-1.8.7).
384
384
  </div>
385
385
 
386
386
  </body>