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,194 @@
|
|
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::SkippableValidation</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 (S)</a> »
|
23
|
+
<a href="../WhyValidationsSuckIn96.html" title="WhyValidationsSuckIn96">WhyValidationsSuckIn96</a>
|
24
|
+
»
|
25
|
+
<span class="title">SkippableValidation</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::SkippableValidation
|
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/skippable_validation.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
|
+
A mixin to handle specifying :if and :unless options to check before
|
63
|
+
performing validation.
|
64
|
+
</p>
|
65
|
+
|
66
|
+
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
<div class="tags">
|
70
|
+
|
71
|
+
<div class="examples">
|
72
|
+
<h3>Examples:</h3>
|
73
|
+
|
74
|
+
<h4>
|
75
|
+
Validate if a given block returns true
|
76
|
+
|
77
|
+
</h4>
|
78
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
79
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:tracks</span><span class='comma token'>,</span> <span class='symbol val'>:if</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='notop op'>!</span><span class='validatable identifier id'>validatable</span><span class='dot token'>.</span><span class='tracks identifier id'>tracks</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span> <span class='rbrace token'>}</span>
|
80
|
+
<span class='end end kw'>end</span>
|
81
|
+
</pre>
|
82
|
+
|
83
|
+
<h4>
|
84
|
+
Validate if a given method on the validatable object returns true
|
85
|
+
|
86
|
+
</h4>
|
87
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
88
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:tracks</span><span class='comma token'>,</span> <span class='symbol val'>:if</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='symbol val'>:allow_validation</span>
|
89
|
+
<span class='end end kw'>end</span>
|
90
|
+
|
91
|
+
<span class='def def kw'>def</span> <span class='allow_validation identifier id'>allow_validation</span>
|
92
|
+
<span class='false false kw'>false</span>
|
93
|
+
<span class='end end kw'>end</span>
|
94
|
+
</pre>
|
95
|
+
|
96
|
+
<h4>
|
97
|
+
Validate unless a given block returns true
|
98
|
+
|
99
|
+
</h4>
|
100
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
101
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:tracks</span><span class='comma token'>,</span> <span class='symbol val'>:unless</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lambda identifier id'>lambda</span> <span class='lbrace token'>{</span> <span class='validatable identifier id'>validatable</span><span class='dot token'>.</span><span class='tracks identifier id'>tracks</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span> <span class='rbrace token'>}</span>
|
102
|
+
<span class='end end kw'>end</span>
|
103
|
+
</pre>
|
104
|
+
|
105
|
+
<h4>
|
106
|
+
Validate unless a given method on the validatable object returns true
|
107
|
+
|
108
|
+
</h4>
|
109
|
+
<pre class="example code"> <span class='setup_validations identifier id'>setup_validations</span> <span class='do do kw'>do</span>
|
110
|
+
<span class='validates_associated identifier id'>validates_associated</span> <span class='symbol val'>:tracks</span><span class='comma token'>,</span> <span class='symbol val'>:unless</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='symbol val'>:disallow_validation</span>
|
111
|
+
<span class='end end kw'>end</span>
|
112
|
+
|
113
|
+
<span class='def def kw'>def</span> <span class='disallow_validation identifier id'>disallow_validation</span>
|
114
|
+
<span class='true true kw'>true</span>
|
115
|
+
<span class='end end kw'>end</span>
|
116
|
+
</pre>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
<h2>Instance Method Summary</h2>
|
124
|
+
|
125
|
+
<ul class="summary">
|
126
|
+
|
127
|
+
<li class="public ">
|
128
|
+
<span class="summary_signature">
|
129
|
+
|
130
|
+
<a href="#validate-instance_method" title="#validate (instance method)">- (Object) <strong>validate</strong> </a>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
<div id="instance_method_details" class="method_details_list">
|
151
|
+
<h2>Instance Method Details</h2>
|
152
|
+
|
153
|
+
|
154
|
+
<div class="method_details first">
|
155
|
+
<p class="signature first" id="validate-instance_method">
|
156
|
+
|
157
|
+
- (<tt><a href="../Object.html" title="Object">Object</a></tt>) <strong>validate</strong>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</p><table class="source_code">
|
162
|
+
<tr>
|
163
|
+
<td>
|
164
|
+
<pre class="lines">
|
165
|
+
|
166
|
+
|
167
|
+
33
|
168
|
+
34
|
169
|
+
35</pre>
|
170
|
+
</td>
|
171
|
+
<td>
|
172
|
+
<pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/skippable_validation.rb', line 33</span>
|
173
|
+
|
174
|
+
<span class='def def kw'>def</span> <span class='validate identifier id'>validate</span>
|
175
|
+
<span class='skip identifier id'>skip</span> <span class='if if_mod kw'>if</span> <span class='skip_validation? fid id'>skip_validation?</span>
|
176
|
+
<span class='end end kw'>end</span>
|
177
|
+
</pre>
|
178
|
+
</td>
|
179
|
+
</tr>
|
180
|
+
</table>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div id="footer">
|
188
|
+
Generated on Sun Dec 20 19:49:45 2009 by
|
189
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
190
|
+
0.5.2 (ruby-1.8.7).
|
191
|
+
</div>
|
192
|
+
|
193
|
+
</body>
|
194
|
+
</html>
|
@@ -0,0 +1,254 @@
|
|
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::ValidatesAcceptance</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">ValidatesAcceptance</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::ValidatesAcceptance
|
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::ValidatesAcceptance</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_acceptance.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
|
+
Validates the acceptance of an attribute, such as the "I agree to the
|
84
|
+
terms and conditions" checkbox value returned by a form post.
|
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
|
+
Default usage
|
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_acceptance_of identifier id'>validates_acceptance_of</span> <span class='symbol val'>:privacy_policy</span><span class='comma token'>,</span> <span class='symbol val'>:terms_and_conditions</span>
|
101
|
+
<span class='end end kw'>end</span>
|
102
|
+
</pre>
|
103
|
+
|
104
|
+
<h4>
|
105
|
+
Changing the :accept value
|
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_acceptance_of identifier id'>validates_acceptance_of</span> <span class='symbol val'>:privacy_policy</span><span class='comma token'>,</span> <span class='symbol val'>:accept</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"yep"</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'>:allow_nil</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='true true kw'>true</span><span class='comma token'>,</span> <span class='symbol val'>:accept</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"1"</span><span class='comma token'>,</span> <span class='symbol val'>:message</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"must be accepted"</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
|
+
24
|
218
|
+
25
|
219
|
+
26
|
220
|
+
27
|
221
|
+
28
|
222
|
+
29
|
223
|
+
30
|
224
|
+
31</pre>
|
225
|
+
</td>
|
226
|
+
<td>
|
227
|
+
<pre class="code"><span class="info file"># File 'lib/whyvalidationssuckin96/macros/validates_acceptance.rb', line 24</span>
|
228
|
+
|
229
|
+
<span class='def def kw'>def</span> <span class='validate identifier id'>validate</span>
|
230
|
+
<span class='super super kw'>super</span>
|
231
|
+
<span class='if if kw'>if</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:accept</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='attribute_value identifier id'>attribute_value</span>
|
232
|
+
<span class='pass identifier id'>pass</span>
|
233
|
+
<span class='else else kw'>else</span>
|
234
|
+
<span class='fail identifier id'>fail</span>
|
235
|
+
<span class='end end kw'>end</span>
|
236
|
+
<span class='end end kw'>end</span>
|
237
|
+
</pre>
|
238
|
+
</td>
|
239
|
+
</tr>
|
240
|
+
</table>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
</div>
|
244
|
+
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="footer">
|
248
|
+
Generated on Sun Dec 20 19:49:46 2009 by
|
249
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
250
|
+
0.5.2 (ruby-1.8.7).
|
251
|
+
</div>
|
252
|
+
|
253
|
+
</body>
|
254
|
+
</html>
|