mack-active_record 0.6.1.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/doc/classes/Mack/Database/Generators.html +140 -0
  2. data/doc/classes/Mack/Database/{Migrator.html → Migrations.html} +74 -39
  3. data/doc/classes/Mack/Database.html +158 -61
  4. data/doc/classes/Mack/Testing/ActiveRecordHelpers.html +168 -0
  5. data/doc/classes/Mack/ViewHelpers/ActiveRecordHelpers.html +52 -52
  6. data/doc/classes/Mack.html +8 -15
  7. data/doc/created.rid +1 -1
  8. data/doc/files/lib/mack-active_record/{genosaurus_helpers_rb.html → database_migrations_rb.html} +4 -4
  9. data/doc/files/lib/mack-active_record/database_rb.html +1 -11
  10. data/doc/files/lib/mack-active_record/{model_column_rb.html → generators_rb.html} +4 -4
  11. data/doc/files/lib/mack-active_record/helpers/orm_helpers_rb.html +1 -1
  12. data/doc/files/lib/mack-active_record/{scaffold_generator/scaffold_generator_rb.html → test_extensions_rb.html} +12 -17
  13. data/doc/files/lib/mack-active_record_rb.html +2 -1
  14. data/doc/files/lib/mack-active_record_tasks_rb.html +8 -1
  15. data/doc/fr_class_index.html +3 -5
  16. data/doc/fr_file_index.html +3 -3
  17. data/doc/fr_method_index.html +11 -14
  18. data/lib/mack-active_record/database.rb +81 -59
  19. data/lib/mack-active_record/database_migrations.rb +29 -0
  20. data/lib/mack-active_record/generators.rb +11 -0
  21. data/lib/mack-active_record/helpers/orm_helpers.rb +9 -12
  22. data/lib/mack-active_record/model_generator/manifest.yml +2 -2
  23. data/lib/mack-active_record/tasks/db_migration_tasks.rake +2 -15
  24. data/lib/mack-active_record/test_extensions.rb +101 -0
  25. data/lib/mack-active_record.rb +4 -3
  26. data/lib/mack-active_record_tasks.rb +1 -0
  27. metadata +22 -22
  28. data/doc/classes/Mack/Genosaurus/ActiveRecord/Helpers.html +0 -225
  29. data/doc/classes/Mack/Genosaurus/ActiveRecord/ModelColumn.html +0 -299
  30. data/doc/classes/Mack/ViewHelpers.html +0 -111
  31. data/doc/classes/ScaffoldGenerator.html +0 -123
  32. data/lib/mack-active_record/genosaurus_helpers.rb +0 -40
  33. data/lib/mack-active_record/model_column.rb +0 -55
  34. data/lib/mack-active_record/scaffold_generator/manifest.yml +0 -31
  35. data/lib/mack-active_record/scaffold_generator/scaffold_generator.rb +0 -42
  36. data/lib/mack-active_record/scaffold_generator/templates/app/views/edit.html.erb.template +0 -19
  37. data/lib/mack-active_record/scaffold_generator/templates/app/views/index.html.erb.template +0 -41
  38. data/lib/mack-active_record/scaffold_generator/templates/app/views/new.html.erb.template +0 -19
  39. data/lib/mack-active_record/scaffold_generator/templates/app/views/show.html.erb.template +0 -12
  40. data/lib/mack-active_record/scaffold_generator/templates/spec.rb.template +0 -47
  41. data/lib/mack-active_record/scaffold_generator/templates/test.rb.template +0 -9
  42. data/lib/mack-active_record/tasks/db_create_drop_tasks.rake +0 -52
@@ -1,225 +0,0 @@
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::Genosaurus::ActiveRecord::Helpers</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::Genosaurus::ActiveRecord::Helpers</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../../files/lib/mack-active_record/genosaurus_helpers_rb.html">
59
- lib/mack-active_record/genosaurus_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="#M000002">columns</a>&nbsp;&nbsp;
84
- <a href="#M000003">db_directory</a>&nbsp;&nbsp;
85
- <a href="#M000004">migrations_directory</a>&nbsp;&nbsp;
86
- <a href="#M000005">next_migration_number</a>&nbsp;&nbsp;
87
- </div>
88
- </div>
89
-
90
- </div>
91
-
92
-
93
- <!-- if includes -->
94
-
95
- <div id="section">
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
- <!-- if method_list -->
105
- <div id="methods">
106
- <h3 class="section-bar">Public Instance methods</h3>
107
-
108
- <div id="method-M000002" class="method-detail">
109
- <a name="M000002"></a>
110
-
111
- <div class="method-heading">
112
- <a href="#M000002" class="method-signature">
113
- <span class="method-name">columns</span><span class="method-args">(name = param(:name))</span>
114
- </a>
115
- </div>
116
-
117
- <div class="method-description">
118
- <p><a class="source-toggle" href="#"
119
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
120
- <div class="method-source-code" id="M000002-source">
121
- <pre>
122
- <span class="ruby-comment cmt"># File lib/mack-active_record/genosaurus_helpers.rb, line 6</span>
123
- 6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">columns</span>(<span class="ruby-identifier">name</span> = <span class="ruby-identifier">param</span>(<span class="ruby-identifier">:name</span>))
124
- 7: <span class="ruby-identifier">ivar_cache</span>(<span class="ruby-value str">&quot;form_columns&quot;</span>) <span class="ruby-keyword kw">do</span>
125
- 8: <span class="ruby-identifier">cs</span> = []
126
- 9: <span class="ruby-identifier">cols</span> = (<span class="ruby-identifier">param</span>(<span class="ruby-identifier">:cols</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">param</span>(<span class="ruby-identifier">:columns</span>))
127
- 10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cols</span>
128
- 11: <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
129
- 12: <span class="ruby-identifier">cs</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Genosaurus</span><span class="ruby-operator">::</span><span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">ModelColumn</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">x</span>)
130
- 13: <span class="ruby-keyword kw">end</span>
131
- 14: <span class="ruby-keyword kw">end</span>
132
- 15: <span class="ruby-identifier">cs</span>
133
- 16: <span class="ruby-keyword kw">end</span>
134
- 17: <span class="ruby-keyword kw">end</span>
135
- </pre>
136
- </div>
137
- </div>
138
- </div>
139
-
140
- <div id="method-M000003" class="method-detail">
141
- <a name="M000003"></a>
142
-
143
- <div class="method-heading">
144
- <a href="#M000003" class="method-signature">
145
- <span class="method-name">db_directory</span><span class="method-args">()</span>
146
- </a>
147
- </div>
148
-
149
- <div class="method-description">
150
- <p><a class="source-toggle" href="#"
151
- onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
152
- <div class="method-source-code" id="M000003-source">
153
- <pre>
154
- <span class="ruby-comment cmt"># File lib/mack-active_record/genosaurus_helpers.rb, line 19</span>
155
- 19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">db_directory</span>
156
- 20: <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;db&quot;</span>)
157
- 21: <span class="ruby-keyword kw">end</span>
158
- </pre>
159
- </div>
160
- </div>
161
- </div>
162
-
163
- <div id="method-M000004" class="method-detail">
164
- <a name="M000004"></a>
165
-
166
- <div class="method-heading">
167
- <a href="#M000004" class="method-signature">
168
- <span class="method-name">migrations_directory</span><span class="method-args">()</span>
169
- </a>
170
- </div>
171
-
172
- <div class="method-description">
173
- <p><a class="source-toggle" href="#"
174
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
175
- <div class="method-source-code" id="M000004-source">
176
- <pre>
177
- <span class="ruby-comment cmt"># File lib/mack-active_record/genosaurus_helpers.rb, line 23</span>
178
- 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">migrations_directory</span>
179
- 24: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">db_directory</span>, <span class="ruby-value str">&quot;migrations&quot;</span>)
180
- 25: <span class="ruby-keyword kw">end</span>
181
- </pre>
182
- </div>
183
- </div>
184
- </div>
185
-
186
- <div id="method-M000005" class="method-detail">
187
- <a name="M000005"></a>
188
-
189
- <div class="method-heading">
190
- <a href="#M000005" class="method-signature">
191
- <span class="method-name">next_migration_number</span><span class="method-args">()</span>
192
- </a>
193
- </div>
194
-
195
- <div class="method-description">
196
- <p><a class="source-toggle" href="#"
197
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
198
- <div class="method-source-code" id="M000005-source">
199
- <pre>
200
- <span class="ruby-comment cmt"># File lib/mack-active_record/genosaurus_helpers.rb, line 27</span>
201
- 27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_migration_number</span>
202
- 28: <span class="ruby-identifier">last</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">migrations_directory</span>, <span class="ruby-value str">&quot;*.rb&quot;</span>)).<span class="ruby-identifier">last</span>
203
- 29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last</span>
204
- 30: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">last</span>).<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^\d+/</span>).<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">succ</span>
205
- 31: <span class="ruby-keyword kw">end</span>
206
- 32: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;001&quot;</span>
207
- 33: <span class="ruby-keyword kw">end</span>
208
- </pre>
209
- </div>
210
- </div>
211
- </div>
212
-
213
-
214
- </div>
215
-
216
-
217
- </div>
218
-
219
-
220
- <div id="validator-badges">
221
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
222
- </div>
223
-
224
- </body>
225
- </html>
@@ -1,299 +0,0 @@
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/mack-active_record/model_column_rb.html">
59
- lib/mack-active_record/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/mack-active_record/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/mack-active_record/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/mack-active_record/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/mack-active_record/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>
@@ -1,111 +0,0 @@
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/mack-active_record/helpers/orm_helpers_rb.html">
59
- lib/mack-active_record/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>