whyvalidationssuckin96 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/LICENSE +20 -0
- data/README.md +121 -0
- data/Rakefile +45 -0
- data/VERSION +1 -0
- data/doc/ActiveRecord/RecordInvalid.html +258 -0
- data/doc/ActiveRecord.html +93 -0
- data/doc/FalseClass.html +87 -0
- data/doc/NilClass.html +87 -0
- data/doc/Numeric.html +87 -0
- data/doc/Object.html +79 -0
- data/doc/String.html +87 -0
- data/doc/TrueClass.html +87 -0
- data/doc/WhyValidationsSuckIn96/ActiveRecord/InstanceMethods.html +156 -0
- data/doc/WhyValidationsSuckIn96/ActiveRecord.html +192 -0
- data/doc/WhyValidationsSuckIn96/AttributeBasedValidation.html +464 -0
- data/doc/WhyValidationsSuckIn96/SkippableValidation.html +194 -0
- data/doc/WhyValidationsSuckIn96/ValidatesAcceptance.html +254 -0
- data/doc/WhyValidationsSuckIn96/ValidatesAssociated.html +250 -0
- data/doc/WhyValidationsSuckIn96/ValidatesConfirmation.html +251 -0
- data/doc/WhyValidationsSuckIn96/ValidatesExclusion.html +388 -0
- data/doc/WhyValidationsSuckIn96/ValidatesFormat.html +387 -0
- data/doc/WhyValidationsSuckIn96/ValidatesInclusion.html +388 -0
- data/doc/WhyValidationsSuckIn96/ValidatesLength.html +469 -0
- data/doc/WhyValidationsSuckIn96/ValidatesNumericality.html +267 -0
- data/doc/WhyValidationsSuckIn96/ValidatesPresence.html +244 -0
- data/doc/WhyValidationsSuckIn96/ValidatesUniqueness.html +289 -0
- data/doc/WhyValidationsSuckIn96/Validation.html +934 -0
- data/doc/WhyValidationsSuckIn96/ValidationBuilder.html +391 -0
- data/doc/WhyValidationsSuckIn96/ValidationSupport/ClassMethods.html +249 -0
- data/doc/WhyValidationsSuckIn96/ValidationSupport/InstanceMethods.html +484 -0
- data/doc/WhyValidationsSuckIn96/ValidationSupport.html +168 -0
- data/doc/WhyValidationsSuckIn96.html +97 -0
- data/doc/_index.html +346 -0
- data/doc/class_list.html +293 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +23 -0
- data/doc/css/style.css +263 -0
- data/doc/file.README.html +173 -0
- data/doc/file_list.html +29 -0
- data/doc/index.html +173 -0
- data/doc/js/app.js +91 -0
- data/doc/js/full_list.js +39 -0
- data/doc/js/jquery.js +19 -0
- data/doc/method_list.html +462 -0
- data/doc/top-level-namespace.html +81 -0
- data/lib/whyvalidationssuckin96/attribute_based_validation.rb +46 -0
- data/lib/whyvalidationssuckin96/constants.rb +3 -0
- data/lib/whyvalidationssuckin96/ext/blank.rb +47 -0
- data/lib/whyvalidationssuckin96/macros/validates_acceptance.rb +36 -0
- data/lib/whyvalidationssuckin96/macros/validates_associated.rb +33 -0
- data/lib/whyvalidationssuckin96/macros/validates_confirmation.rb +40 -0
- data/lib/whyvalidationssuckin96/macros/validates_exclusion.rb +38 -0
- data/lib/whyvalidationssuckin96/macros/validates_format.rb +38 -0
- data/lib/whyvalidationssuckin96/macros/validates_inclusion.rb +38 -0
- data/lib/whyvalidationssuckin96/macros/validates_length.rb +98 -0
- data/lib/whyvalidationssuckin96/macros/validates_numericality.rb +56 -0
- data/lib/whyvalidationssuckin96/macros/validates_presence.rb +30 -0
- data/lib/whyvalidationssuckin96/macros.rb +9 -0
- data/lib/whyvalidationssuckin96/rails/active_record.rb +94 -0
- data/lib/whyvalidationssuckin96/rails/macros/validates_uniqueness.rb +87 -0
- data/lib/whyvalidationssuckin96/rails/macros.rb +1 -0
- data/lib/whyvalidationssuckin96/skippable_validation.rb +59 -0
- data/lib/whyvalidationssuckin96/validation.rb +88 -0
- data/lib/whyvalidationssuckin96/validation_builder.rb +56 -0
- data/lib/whyvalidationssuckin96/validation_support.rb +74 -0
- data/lib/whyvalidationssuckin96.rb +4 -0
- data/test/attribute_based_validation_test.rb +58 -0
- data/test/macros/validates_acceptance_test.rb +64 -0
- data/test/macros/validates_associated_test.rb +60 -0
- data/test/macros/validates_confirmation_test.rb +63 -0
- data/test/macros/validates_exclusion_test.rb +37 -0
- data/test/macros/validates_format_test.rb +43 -0
- data/test/macros/validates_inclusion_test.rb +37 -0
- data/test/macros/validates_length_test.rb +179 -0
- data/test/macros/validates_numericality_test.rb +129 -0
- data/test/macros/validates_presence_test.rb +31 -0
- data/test/rails/active_record_test.rb +187 -0
- data/test/rails/active_record_test_helper.rb +90 -0
- data/test/rails/macros/validates_uniqueness_test.rb +153 -0
- data/test/skippable_validation_test.rb +102 -0
- data/test/teststrap.rb +4 -0
- data/test/validation_builder_test.rb +62 -0
- data/test/validation_support_test.rb +209 -0
- data/test/validation_test.rb +101 -0
- data/whyvalidationssuckin96.gemspec +153 -0
- metadata +189 -0
@@ -0,0 +1,250 @@
|
|
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>Class: WhyValidationsSuckIn96::ValidatesAssociated</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 (V)</a> »
|
23
|
+
<a href="../WhyValidationsSuckIn96.html" title="WhyValidationsSuckIn96">WhyValidationsSuckIn96</a>
|
24
|
+
»
|
25
|
+
<span class="title">ValidatesAssociated</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>Class: WhyValidationsSuckIn96::ValidatesAssociated
|
41
|
+
|
42
|
+
|
43
|
+
</h1>
|
44
|
+
|
45
|
+
<dl class="box">
|
46
|
+
|
47
|
+
<dt class="r1">Inherits:</dt>
|
48
|
+
<dd class="r1">
|
49
|
+
<span class="inheritName"><a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></span>
|
50
|
+
|
51
|
+
<ul class="fullTree">
|
52
|
+
<li><a href="../Object.html" title="Object">Object</a></li>
|
53
|
+
|
54
|
+
<li class="next"><a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></li>
|
55
|
+
|
56
|
+
<li class="next">WhyValidationsSuckIn96::ValidatesAssociated</li>
|
57
|
+
|
58
|
+
</ul>
|
59
|
+
<a href="#" class="inheritanceTree">show all</a>
|
60
|
+
|
61
|
+
</dd>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<dt class="r2">Includes:</dt>
|
69
|
+
<dd class="r2"><a href="AttributeBasedValidation.html" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a>, <a href="SkippableValidation.html" title="WhyValidationsSuckIn96::SkippableValidation">WhyValidationsSuckIn96::SkippableValidation</a></dd>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<dt class="r1 last">Defined in:</dt>
|
75
|
+
<dd class="r1 last">lib/whyvalidationssuckin96/macros/validates_associated.rb</dd>
|
76
|
+
|
77
|
+
</dl>
|
78
|
+
<div class="clear"></div>
|
79
|
+
|
80
|
+
<h2>Overview</h2><div class="docstring">
|
81
|
+
<div class="discussion">
|
82
|
+
<p>
|
83
|
+
Checks the validity of any associated objects, such as an ActiveRecord
|
84
|
+
association.
|
85
|
+
</p>
|
86
|
+
|
87
|
+
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
<div class="tags">
|
91
|
+
|
92
|
+
<div class="examples">
|
93
|
+
<h3>Examples:</h3>
|
94
|
+
|
95
|
+
<h4>
|
96
|
+
Checking the validity of an associated collection of tracks
|
97
|
+
|
98
|
+
</h4>
|
99
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
100
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:tracks</span>
|
101
|
+
<span class='end end kw'>end</span>
|
102
|
+
</pre>
|
103
|
+
|
104
|
+
<h4>
|
105
|
+
Checking the validity of an associated artist
|
106
|
+
|
107
|
+
</h4>
|
108
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
109
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:artist</span>
|
110
|
+
<span class='end end kw'>end</span>
|
111
|
+
</pre>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
<h2>Constant Summary</h2>
|
117
|
+
|
118
|
+
<dl class="constants">
|
119
|
+
|
120
|
+
<dt id="DefaultOptions-constant ">DefaultOptions =
|
121
|
+
<span class="summary_desc"></span>
|
122
|
+
</dt>
|
123
|
+
<dd><pre class="code"><span class='lbrace token'>{</span><span class='symbol val'>:message</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"is invalid"</span><span class='rbrace token'>}</span>
|
124
|
+
</pre></dd>
|
125
|
+
|
126
|
+
</dl>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h3 class="inherited">Constants inherited from <a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></h3>
|
143
|
+
<p class="inherited"><a href="Validation.html#DefaultOptions-constant" title="DefaultOptions">DefaultOptions</a></p>
|
144
|
+
|
145
|
+
|
146
|
+
<h2>Instance Method Summary</h2>
|
147
|
+
|
148
|
+
<ul class="summary">
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#validate-instance_method" title="#validate (instance method)">- (Object) <strong>validate</strong> </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<span class="summary_desc"></span>
|
166
|
+
|
167
|
+
</li>
|
168
|
+
|
169
|
+
|
170
|
+
</ul>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<h3 class="inherited">Methods included from <a href="AttributeBasedValidation.html" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a></h3>
|
183
|
+
<p class="inherited"><a href="AttributeBasedValidation.html#attribute-instance_method" title="#attribute">#attribute</a>, <a href="AttributeBasedValidation.html#attribute_value-instance_method" title="#attribute_value">#attribute_value</a>, <a href="AttributeBasedValidation.html#initialize-instance_method" title="#initialize">#initialize</a></p>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<h3 class="inherited">Methods inherited from <a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></h3>
|
191
|
+
<p class="inherited"><a href="Validation.html#failed%3F-instance_method" title="#failed?">#failed?</a>, <a href="Validation.html#has_run%3F-instance_method" title="#has_run?">#has_run?</a>, <a href="Validation.html#initialize-instance_method" title="#initialize">#initialize</a>, <a href="Validation.html#message-instance_method" title="#message">#message</a>, <a href="Validation.html#new_subclass-class_method" title="new_subclass">new_subclass</a>, <a href="Validation.html#passed%3F-instance_method" title="#passed?">#passed?</a>, <a href="Validation.html#validates%3F-instance_method" title="#validates?">#validates?</a></p>
|
192
|
+
<div id="constructor_details" class="method_details_list">
|
193
|
+
<h2>Constructor Details</h2>
|
194
|
+
|
195
|
+
<p class="notice">This class inherits a constructor from <a href="AttributeBasedValidation.html#initialize-instance_method" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a></p>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
<div id="instance_method_details" class="method_details_list">
|
201
|
+
<h2>Instance Method Details</h2>
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method_details first">
|
205
|
+
<p class="signature first" id="validate-instance_method">
|
206
|
+
|
207
|
+
- (<tt><a href="../Object.html" title="Object">Object</a></tt>) <strong>validate</strong>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</p><table class="source_code">
|
212
|
+
<tr>
|
213
|
+
<td>
|
214
|
+
<pre class="lines">
|
215
|
+
|
216
|
+
|
217
|
+
23
|
218
|
+
24
|
219
|
+
25
|
220
|
+
26
|
221
|
+
27
|
222
|
+
28</pre>
|
223
|
+
</td>
|
224
|
+
<td>
|
225
|
+
<pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/macros/validates_associated.rb', line 23</span>
|
226
|
+
|
227
|
+
<span class='def def kw'>def</span> <span class='validate identifier id'>validate</span>
|
228
|
+
<span class='super super kw'>super</span>
|
229
|
+
<span class='Array constant id'>Array</span><span class='lparen token'>(</span><span class='attribute_value identifier id'>attribute_value</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='collect identifier id'>collect</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='assoc identifier id'>assoc</span><span class='bitor op'>|</span>
|
230
|
+
<span class='assoc identifier id'>assoc</span><span class='dot token'>.</span><span class='valid? fid id'>valid?</span>
|
231
|
+
<span class='end end kw'>end</span><span class='dot token'>.</span><span class='all? fid id'>all?</span> <span class='integer val'>? </span><span class='pass identifier id'>pass</span> <span class='colon op'>:</span> <span class='fail identifier id'>fail</span>
|
232
|
+
<span class='end end kw'>end</span>
|
233
|
+
</pre>
|
234
|
+
</td>
|
235
|
+
</tr>
|
236
|
+
</table>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<div id="footer">
|
244
|
+
Generated on Sun Dec 20 19:49:46 2009 by
|
245
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
246
|
+
0.5.2 (ruby-1.8.7).
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</body>
|
250
|
+
</html>
|
@@ -0,0 +1,251 @@
|
|
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>Class: WhyValidationsSuckIn96::ValidatesConfirmation</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 (V)</a> »
|
23
|
+
<a href="../WhyValidationsSuckIn96.html" title="WhyValidationsSuckIn96">WhyValidationsSuckIn96</a>
|
24
|
+
»
|
25
|
+
<span class="title">ValidatesConfirmation</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>Class: WhyValidationsSuckIn96::ValidatesConfirmation
|
41
|
+
|
42
|
+
|
43
|
+
</h1>
|
44
|
+
|
45
|
+
<dl class="box">
|
46
|
+
|
47
|
+
<dt class="r1">Inherits:</dt>
|
48
|
+
<dd class="r1">
|
49
|
+
<span class="inheritName"><a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></span>
|
50
|
+
|
51
|
+
<ul class="fullTree">
|
52
|
+
<li><a href="../Object.html" title="Object">Object</a></li>
|
53
|
+
|
54
|
+
<li class="next"><a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></li>
|
55
|
+
|
56
|
+
<li class="next">WhyValidationsSuckIn96::ValidatesConfirmation</li>
|
57
|
+
|
58
|
+
</ul>
|
59
|
+
<a href="#" class="inheritanceTree">show all</a>
|
60
|
+
|
61
|
+
</dd>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<dt class="r2">Includes:</dt>
|
69
|
+
<dd class="r2"><a href="AttributeBasedValidation.html" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a>, <a href="SkippableValidation.html" title="WhyValidationsSuckIn96::SkippableValidation">WhyValidationsSuckIn96::SkippableValidation</a></dd>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
<dt class="r1 last">Defined in:</dt>
|
75
|
+
<dd class="r1 last">lib/whyvalidationssuckin96/macros/validates_confirmation.rb</dd>
|
76
|
+
|
77
|
+
</dl>
|
78
|
+
<div class="clear"></div>
|
79
|
+
|
80
|
+
<h2>Overview</h2><div class="docstring">
|
81
|
+
<div class="discussion">
|
82
|
+
<p>
|
83
|
+
Checks the validity of an attribute against a confirmation field. Note that
|
84
|
+
this validation does not set up the confirmation field on the object,
|
85
|
+
leaving this up to the implementer.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
<div class="tags">
|
92
|
+
|
93
|
+
<div class="examples">
|
94
|
+
<h3>Examples:</h3>
|
95
|
+
|
96
|
+
<h4>
|
97
|
+
Default usage
|
98
|
+
|
99
|
+
</h4>
|
100
|
+
<pre class="example code"> <span class='class class kw'>class</span> <span class='Account constant id'>Account</span>
|
101
|
+
<span class='attr_accessor identifier id'>attr_accessor</span> <span class='symbol val'>:password</span><span class='comma token'>,</span> <span class='symbol val'>:password_confirmation</span>
|
102
|
+
<span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
103
|
+
<span class='validates_confirmation_of identifier id'>validates_confirmation_of</span> <span class='symbol val'>:password</span>
|
104
|
+
<span class='end end kw'>end</span>
|
105
|
+
<span class='end end kw'>end</span>
|
106
|
+
</pre>
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
<h2>Constant Summary</h2>
|
112
|
+
|
113
|
+
<dl class="constants">
|
114
|
+
|
115
|
+
<dt id="DefaultOptions-constant ">DefaultOptions =
|
116
|
+
<span class="summary_desc"></span>
|
117
|
+
</dt>
|
118
|
+
<dd><pre class="code"><span class='lbrace token'>{</span><span class='symbol val'>:message</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"does not match the confirmation"</span><span class='rbrace token'>}</span>
|
119
|
+
</pre></dd>
|
120
|
+
|
121
|
+
</dl>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<h3 class="inherited">Constants inherited from <a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></h3>
|
138
|
+
<p class="inherited"><a href="Validation.html#DefaultOptions-constant" title="DefaultOptions">DefaultOptions</a></p>
|
139
|
+
|
140
|
+
|
141
|
+
<h2>Instance Method Summary</h2>
|
142
|
+
|
143
|
+
<ul class="summary">
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#validate-instance_method" title="#validate (instance method)">- (Object) <strong>validate</strong> </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<span class="summary_desc"></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
</ul>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<h3 class="inherited">Methods included from <a href="AttributeBasedValidation.html" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a></h3>
|
178
|
+
<p class="inherited"><a href="AttributeBasedValidation.html#attribute-instance_method" title="#attribute">#attribute</a>, <a href="AttributeBasedValidation.html#attribute_value-instance_method" title="#attribute_value">#attribute_value</a>, <a href="AttributeBasedValidation.html#initialize-instance_method" title="#initialize">#initialize</a></p>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<h3 class="inherited">Methods inherited from <a href="Validation.html" title="WhyValidationsSuckIn96::Validation">WhyValidationsSuckIn96::Validation</a></h3>
|
186
|
+
<p class="inherited"><a href="Validation.html#failed%3F-instance_method" title="#failed?">#failed?</a>, <a href="Validation.html#has_run%3F-instance_method" title="#has_run?">#has_run?</a>, <a href="Validation.html#initialize-instance_method" title="#initialize">#initialize</a>, <a href="Validation.html#message-instance_method" title="#message">#message</a>, <a href="Validation.html#new_subclass-class_method" title="new_subclass">new_subclass</a>, <a href="Validation.html#passed%3F-instance_method" title="#passed?">#passed?</a>, <a href="Validation.html#validates%3F-instance_method" title="#validates?">#validates?</a></p>
|
187
|
+
<div id="constructor_details" class="method_details_list">
|
188
|
+
<h2>Constructor Details</h2>
|
189
|
+
|
190
|
+
<p class="notice">This class inherits a constructor from <a href="AttributeBasedValidation.html#initialize-instance_method" title="WhyValidationsSuckIn96::AttributeBasedValidation">WhyValidationsSuckIn96::AttributeBasedValidation</a></p>
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
<div id="instance_method_details" class="method_details_list">
|
196
|
+
<h2>Instance Method Details</h2>
|
197
|
+
|
198
|
+
|
199
|
+
<div class="method_details first">
|
200
|
+
<p class="signature first" id="validate-instance_method">
|
201
|
+
|
202
|
+
- (<tt><a href="../Object.html" title="Object">Object</a></tt>) <strong>validate</strong>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
</p><table class="source_code">
|
207
|
+
<tr>
|
208
|
+
<td>
|
209
|
+
<pre class="lines">
|
210
|
+
|
211
|
+
|
212
|
+
22
|
213
|
+
23
|
214
|
+
24
|
215
|
+
25
|
216
|
+
26
|
217
|
+
27
|
218
|
+
28
|
219
|
+
29
|
220
|
+
30</pre>
|
221
|
+
</td>
|
222
|
+
<td>
|
223
|
+
<pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/macros/validates_confirmation.rb', line 22</span>
|
224
|
+
|
225
|
+
<span class='def def kw'>def</span> <span class='validate identifier id'>validate</span>
|
226
|
+
<span class='super super kw'>super</span>
|
227
|
+
<span class='skip identifier id'>skip</span> <span class='unless unless_mod kw'>unless</span> <span class='confirmation_value identifier id'>confirmation_value</span> <span class='assign token'>=</span> <span class='validatable identifier id'>validatable</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='confirmation_field identifier id'>confirmation_field</span><span class='rparen token'>)</span>
|
228
|
+
<span class='if if kw'>if</span> <span class='confirmation_value identifier id'>confirmation_value</span> <span class='eq op'>==</span> <span class='attribute_value identifier id'>attribute_value</span>
|
229
|
+
<span class='pass identifier id'>pass</span>
|
230
|
+
<span class='else else kw'>else</span>
|
231
|
+
<span class='fail identifier id'>fail</span>
|
232
|
+
<span class='end end kw'>end</span>
|
233
|
+
<span class='end end kw'>end</span>
|
234
|
+
</pre>
|
235
|
+
</td>
|
236
|
+
</tr>
|
237
|
+
</table>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
</div>
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div id="footer">
|
245
|
+
Generated on Sun Dec 20 19:49:46 2009 by
|
246
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
247
|
+
0.5.2 (ruby-1.8.7).
|
248
|
+
</div>
|
249
|
+
|
250
|
+
</body>
|
251
|
+
</html>
|