mack-active_record 0.6.0 → 0.6.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,299 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mack::Genosaurus::ActiveRecord::ModelColumn</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mack::Genosaurus::ActiveRecord::ModelColumn</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/model_column_rb.html">
59
+ lib/model_column.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Used to represent a &#8216;column&#8217; from the param cols or columns for
84
+ generators.
85
+ </p>
86
+
87
+ </div>
88
+
89
+
90
+ </div>
91
+
92
+ <div id="method-list">
93
+ <h3 class="section-bar">Methods</h3>
94
+
95
+ <div class="name-list">
96
+ <a href="#M000008">form_element_id</a>&nbsp;&nbsp;
97
+ <a href="#M000007">form_element_name</a>&nbsp;&nbsp;
98
+ <a href="#M000009">form_field</a>&nbsp;&nbsp;
99
+ <a href="#M000006">new</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+ <div id="attribute-list">
115
+ <h3 class="section-bar">Attributes</h3>
116
+
117
+ <div class="name-list">
118
+ <table>
119
+ <tr class="top-aligned-row context-row">
120
+ <td class="context-item-name">column_name</td>
121
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
122
+ <td class="context-item-desc">
123
+ The name of the column.
124
+
125
+ </td>
126
+ </tr>
127
+ <tr class="top-aligned-row context-row">
128
+ <td class="context-item-name">column_type</td>
129
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
130
+ <td class="context-item-desc">
131
+ The type of the column. Ie. string, integer, datetime, etc&#8230;
132
+
133
+ </td>
134
+ </tr>
135
+ <tr class="top-aligned-row context-row">
136
+ <td class="context-item-name">model_name</td>
137
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
138
+ <td class="context-item-desc">
139
+ The name of the model associated with the column. Ie. user, post,
140
+ etc&#8230;
141
+
142
+ </td>
143
+ </tr>
144
+ </table>
145
+ </div>
146
+ </div>
147
+
148
+
149
+
150
+ <!-- if method_list -->
151
+ <div id="methods">
152
+ <h3 class="section-bar">Public Class methods</h3>
153
+
154
+ <div id="method-M000006" class="method-detail">
155
+ <a name="M000006"></a>
156
+
157
+ <div class="method-heading">
158
+ <a href="#M000006" class="method-signature">
159
+ <span class="method-name">new</span><span class="method-args">(model_name, column_unsplit)</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p>
165
+ Takes in the model_name (user, post, etc&#8230;) and the column
166
+ (username:string, body:text, etc&#8230;)
167
+ </p>
168
+ <p><a class="source-toggle" href="#"
169
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000006-source">
171
+ <pre>
172
+ <span class="ruby-comment cmt"># File lib/model_column.rb, line 15</span>
173
+ 15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">model_name</span>, <span class="ruby-identifier">column_unsplit</span>)
174
+ 16: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">model_name</span> = <span class="ruby-identifier">model_name</span>.<span class="ruby-identifier">singular</span>.<span class="ruby-identifier">underscore</span>
175
+ 17: <span class="ruby-identifier">cols</span> = <span class="ruby-identifier">column_unsplit</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;:&quot;</span>)
176
+ 18: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_name</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">first</span><span class="ruby-comment cmt">#.underscore</span>
177
+ 19: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_type</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">last</span><span class="ruby-comment cmt">#.underscore</span>
178
+ 20: <span class="ruby-keyword kw">end</span>
179
+ </pre>
180
+ </div>
181
+ </div>
182
+ </div>
183
+
184
+ <h3 class="section-bar">Public Instance methods</h3>
185
+
186
+ <div id="method-M000008" class="method-detail">
187
+ <a name="M000008"></a>
188
+
189
+ <div class="method-heading">
190
+ <a href="#M000008" class="method-signature">
191
+ <span class="method-name">form_element_id</span><span class="method-args">()</span>
192
+ </a>
193
+ </div>
194
+
195
+ <div class="method-description">
196
+ <p>
197
+ Examples:
198
+ </p>
199
+ <pre>
200
+ Mack::Generator::ColumnObject.new(&quot;user&quot;, &quot;username:string&quot;).form_element_id # =&gt; &quot;user_username&quot;
201
+ Mack::Generator::ColumnObject.new(&quot;Post&quot;, &quot;body:text&quot;).form_element_id # =&gt; &quot;post_body&quot;
202
+ </pre>
203
+ <p><a class="source-toggle" href="#"
204
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
205
+ <div class="method-source-code" id="M000008-source">
206
+ <pre>
207
+ <span class="ruby-comment cmt"># File lib/model_column.rb, line 32</span>
208
+ 32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">form_element_id</span>
209
+ 33: <span class="ruby-node">&quot;#{self.model_name}_#{self.column_name}&quot;</span>
210
+ 34: <span class="ruby-keyword kw">end</span>
211
+ </pre>
212
+ </div>
213
+ </div>
214
+ </div>
215
+
216
+ <div id="method-M000007" class="method-detail">
217
+ <a name="M000007"></a>
218
+
219
+ <div class="method-heading">
220
+ <a href="#M000007" class="method-signature">
221
+ <span class="method-name">form_element_name</span><span class="method-args">()</span>
222
+ </a>
223
+ </div>
224
+
225
+ <div class="method-description">
226
+ <p>
227
+ Examples:
228
+ </p>
229
+ <pre>
230
+ Mack::Generator::ColumnObject.new(&quot;user&quot;, &quot;username:string&quot;).form_element_name # =&gt; &quot;user[username]&quot;
231
+ Mack::Generator::ColumnObject.new(&quot;Post&quot;, &quot;body:text&quot;).form_element_name # =&gt; &quot;post[body]&quot;
232
+ </pre>
233
+ <p><a class="source-toggle" href="#"
234
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
235
+ <div class="method-source-code" id="M000007-source">
236
+ <pre>
237
+ <span class="ruby-comment cmt"># File lib/model_column.rb, line 25</span>
238
+ 25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">form_element_name</span>
239
+ 26: <span class="ruby-node">&quot;#{self.model_name}[#{self.column_name}]&quot;</span>
240
+ 27: <span class="ruby-keyword kw">end</span>
241
+ </pre>
242
+ </div>
243
+ </div>
244
+ </div>
245
+
246
+ <div id="method-M000009" class="method-detail">
247
+ <a name="M000009"></a>
248
+
249
+ <div class="method-heading">
250
+ <a href="#M000009" class="method-signature">
251
+ <span class="method-name">form_field</span><span class="method-args">()</span>
252
+ </a>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+ <p>
257
+ Generates the appropriate HTML form field for the type of column
258
+ represented.
259
+ </p>
260
+ <p>
261
+ Examples:
262
+ </p>
263
+ <pre>
264
+ Mack::Generator::ColumnObject.new(&quot;user&quot;, &quot;username:string&quot;).form_field
265
+ =&gt; &quot;&lt;input type=&quot;text&quot; name=&quot;user[username]&quot; id=&quot;user_username&quot; size=&quot;30&quot; value=&quot;&lt;%= user.username %&gt;&quot; /&gt;&quot;
266
+ Mack::Generator::ColumnObject.new(&quot;Post&quot;, &quot;body:text&quot;).form_field
267
+ =&gt; &quot;&lt;textarea name=&quot;post[body]&quot; id=&quot;post_id&quot;&gt;&lt;%= post.body %&gt;&lt;/textarea&gt;&quot;
268
+ </pre>
269
+ <p><a class="source-toggle" href="#"
270
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
271
+ <div class="method-source-code" id="M000009-source">
272
+ <pre>
273
+ <span class="ruby-comment cmt"># File lib/model_column.rb, line 43</span>
274
+ 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">form_field</span>
275
+ 44: <span class="ruby-keyword kw">case</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">column_type</span>
276
+ 45: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;text&quot;</span>
277
+ 46: <span class="ruby-node">%{&lt;textarea name=&quot;#{self.form_element_name}&quot; id=&quot;#{self.form_element_id}&quot; cols=&quot;60&quot; rows=&quot;20&quot;&gt;&lt;%= @#{self.model_name}.#{self.column_name} %&gt;&lt;/textarea&gt;}</span>
278
+ 47: <span class="ruby-keyword kw">else</span>
279
+ 48: <span class="ruby-node">%{&lt;input type=&quot;text&quot; name=&quot;#{self.form_element_name}&quot; id=&quot;#{self.form_element_id}&quot; size=&quot;30&quot; value=&quot;&lt;%= @#{self.model_name}.#{self.column_name} %&gt;&quot; /&gt;}</span>
280
+ 49: <span class="ruby-keyword kw">end</span>
281
+ 50: <span class="ruby-keyword kw">end</span>
282
+ </pre>
283
+ </div>
284
+ </div>
285
+ </div>
286
+
287
+
288
+ </div>
289
+
290
+
291
+ </div>
292
+
293
+
294
+ <div id="validator-badges">
295
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
296
+ </div>
297
+
298
+ </body>
299
+ </html>
@@ -0,0 +1,200 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::ViewHelpers::ActiveRecordHelpers</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::ViewHelpers::ActiveRecordHelpers</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/helpers/orm_helpers_rb.html">
59
+ lib/helpers/orm_helpers.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000001">error_messages_for</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+ <div id="constants-list">
96
+ <h3 class="section-bar">Constants</h3>
97
+
98
+ <div class="name-list">
99
+ <table summary="Constants">
100
+ <tr class="top-aligned-row context-row">
101
+ <td class="context-item-name">DEFAULT_PARTIAL</td>
102
+ <td>=</td>
103
+ <td class="context-item-value">%{ &lt;div&gt; &lt;div class=&quot;errorExplanation&quot; id=&quot;errorExplanation&quot;&gt; &lt;h2&gt;&lt;%= pluralize_word(errors.size, &quot;error&quot;) %&gt; occured.&lt;/h2&gt; &lt;ul&gt; &lt;% for error in errors %&gt; &lt;li&gt;&lt;%= error %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; }</td>
104
+ </tr>
105
+ </table>
106
+ </div>
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <!-- if method_list -->
115
+ <div id="methods">
116
+ <h3 class="section-bar">Public Instance methods</h3>
117
+
118
+ <div id="method-M000001" class="method-detail">
119
+ <a name="M000001"></a>
120
+
121
+ <div class="method-heading">
122
+ <a href="#M000001" class="method-signature">
123
+ <span class="method-name">error_messages_for</span><span class="method-args">(object_names = [], view_partial = nil)</span>
124
+ </a>
125
+ </div>
126
+
127
+ <div class="method-description">
128
+ <p><a class="source-toggle" href="#"
129
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
130
+ <div class="method-source-code" id="M000001-source">
131
+ <pre>
132
+ <span class="ruby-comment cmt"># File lib/helpers/orm_helpers.rb, line 23</span>
133
+ 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_messages_for</span>(<span class="ruby-identifier">object_names</span> = [], <span class="ruby-identifier">view_partial</span> = <span class="ruby-keyword kw">nil</span>)
134
+ 24: <span class="ruby-identifier">object_names</span> = [<span class="ruby-identifier">object_names</span>]
135
+ 25: <span class="ruby-identifier">object_names</span>.<span class="ruby-identifier">flatten!</span>
136
+ 26: <span class="ruby-identifier">app_errors</span> = []
137
+ 27: <span class="ruby-identifier">object_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
138
+ 28: <span class="ruby-identifier">object</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>)
139
+ 29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object</span>
140
+ 30: <span class="ruby-identifier">object</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
141
+ 31: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>
142
+ 32: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
143
+ 33: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
144
+ 34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^\^/</span>)
145
+ 35: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">v</span>.<span class="ruby-identifier">length</span>]
146
+ 36: <span class="ruby-keyword kw">else</span>
147
+ 37: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;base&quot;</span>
148
+ 38: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{v}&quot;</span>
149
+ 39: <span class="ruby-keyword kw">else</span>
150
+ 40: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{object.business_display_name} #{key.underscore.split('_').join(' ')} #{v}&quot;</span>
151
+ 41: <span class="ruby-keyword kw">end</span>
152
+ 42: <span class="ruby-keyword kw">end</span>
153
+ 43: <span class="ruby-keyword kw">end</span>
154
+ 44: <span class="ruby-keyword kw">else</span>
155
+ 45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^\^/</span>)
156
+ 46: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">value</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">value</span>.<span class="ruby-identifier">length</span>]
157
+ 47: <span class="ruby-keyword kw">else</span>
158
+ 48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;base&quot;</span>
159
+ 49: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{value}&quot;</span>
160
+ 50: <span class="ruby-keyword kw">else</span>
161
+ 51: <span class="ruby-identifier">app_errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{object.business_display_name} #{key.underscore.split('_').join(' ')} #{value}&quot;</span>
162
+ 52: <span class="ruby-keyword kw">end</span>
163
+ 53: <span class="ruby-keyword kw">end</span>
164
+ 54: <span class="ruby-keyword kw">end</span>
165
+ 55: <span class="ruby-keyword kw">end</span>
166
+ 56: <span class="ruby-keyword kw">end</span>
167
+ 57: <span class="ruby-keyword kw">end</span>
168
+ 58: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">app_errors</span>.<span class="ruby-identifier">empty?</span>
169
+ 59: <span class="ruby-identifier">app_errors</span>.<span class="ruby-identifier">uniq!</span>
170
+ 60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">view_partial</span>.<span class="ruby-identifier">nil?</span>
171
+ 61: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Mack</span>.<span class="ruby-identifier">root</span>, <span class="ruby-value str">&quot;app&quot;</span>, <span class="ruby-value str">&quot;views&quot;</span>, <span class="ruby-value str">&quot;application&quot;</span>, <span class="ruby-value str">&quot;_error_messages.html.erb&quot;</span>))
172
+ 62: <span class="ruby-identifier">render</span>(<span class="ruby-identifier">:partial</span>, <span class="ruby-value str">&quot;application/error_messages&quot;</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:errors</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">app_errors</span>})
173
+ 63: <span class="ruby-keyword kw">else</span>
174
+ 64: <span class="ruby-identifier">render</span>(<span class="ruby-identifier">:inline</span>, <span class="ruby-constant">DEFAULT_PARTIAL</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:errors</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">app_errors</span>})
175
+ 65: <span class="ruby-keyword kw">end</span>
176
+ 66: <span class="ruby-keyword kw">else</span>
177
+ 67: <span class="ruby-identifier">render</span>(<span class="ruby-identifier">:partial</span>, <span class="ruby-identifier">view_partial</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:errors</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">app_errors</span>})
178
+ 68: <span class="ruby-keyword kw">end</span>
179
+ 69: <span class="ruby-keyword kw">else</span>
180
+ 70: <span class="ruby-value str">&quot;&quot;</span>
181
+ 71: <span class="ruby-keyword kw">end</span>
182
+ 72: <span class="ruby-keyword kw">end</span>
183
+ </pre>
184
+ </div>
185
+ </div>
186
+ </div>
187
+
188
+
189
+ </div>
190
+
191
+
192
+ </div>
193
+
194
+
195
+ <div id="validator-badges">
196
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
197
+ </div>
198
+
199
+ </body>
200
+ </html>
@@ -0,0 +1,111 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::ViewHelpers</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::ViewHelpers</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/helpers/orm_helpers_rb.html">
59
+ lib/helpers/orm_helpers.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+ <div id="class-list">
88
+ <h3 class="section-bar">Classes and Modules</h3>
89
+
90
+ Module <a href="ViewHelpers/ActiveRecordHelpers.html" class="link">Mack::ViewHelpers::ActiveRecordHelpers</a><br />
91
+
92
+ </div>
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
+ </html>