mack-active_record 0.6.0.1 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/lib/{database.rb → mack-active_record/database.rb} +0 -0
  2. data/lib/{genosaurus_helpers.rb → mack-active_record/genosaurus_helpers.rb} +0 -0
  3. data/lib/{helpers → mack-active_record/helpers}/orm_helpers.rb +0 -0
  4. data/lib/{migration_generator → mack-active_record/migration_generator}/migration_generator.rb +0 -0
  5. data/lib/{migration_generator → mack-active_record/migration_generator}/templates/db/migrations/%=@migration_name%.rb.template +0 -0
  6. data/lib/{model_column.rb → mack-active_record/model_column.rb} +0 -0
  7. data/lib/{model_generator → mack-active_record/model_generator}/manifest.yml +0 -0
  8. data/lib/{model_generator → mack-active_record/model_generator}/model_generator.rb +0 -0
  9. data/lib/{model_generator → mack-active_record/model_generator}/templates/model.rb.template +0 -0
  10. data/lib/{model_generator → mack-active_record/model_generator}/templates/rspec.rb.template +0 -0
  11. data/lib/{model_generator → mack-active_record/model_generator}/templates/test.rb.template +0 -0
  12. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/manifest.yml +0 -0
  13. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/scaffold_generator.rb +0 -0
  14. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/app/controllers/controller.rb.template +0 -0
  15. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/app/views/edit.html.erb.template +0 -0
  16. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/app/views/index.html.erb.template +0 -0
  17. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/app/views/new.html.erb.template +0 -0
  18. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/app/views/show.html.erb.template +0 -0
  19. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/spec.rb.template +0 -0
  20. data/lib/{scaffold_generator → mack-active_record/scaffold_generator}/templates/test.rb.template +0 -0
  21. data/lib/{tasks → mack-active_record/tasks}/db_create_drop_tasks.rake +0 -0
  22. data/lib/{tasks → mack-active_record/tasks}/db_migration_tasks.rake +0 -0
  23. data/lib/mack-active_record.rb +5 -3
  24. data/lib/mack-active_record_tasks.rb +1 -1
  25. metadata +25 -51
  26. data/doc/classes/Mack/Database/Migrator.html +0 -193
  27. data/doc/classes/Mack/Database.html +0 -224
  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/ActiveRecordHelpers.html +0 -200
  31. data/doc/classes/Mack/ViewHelpers.html +0 -111
  32. data/doc/classes/Mack.html +0 -134
  33. data/doc/classes/MigrationGenerator.html +0 -159
  34. data/doc/classes/ModelGenerator.html +0 -174
  35. data/doc/classes/ScaffoldGenerator.html +0 -123
  36. data/doc/created.rid +0 -1
  37. data/doc/files/README.html +0 -111
  38. data/doc/files/lib/database_rb.html +0 -111
  39. data/doc/files/lib/genosaurus_helpers_rb.html +0 -101
  40. data/doc/files/lib/helpers/orm_helpers_rb.html +0 -101
  41. data/doc/files/lib/mack-active_record_rb.html +0 -110
  42. data/doc/files/lib/mack-active_record_tasks_rb.html +0 -101
  43. data/doc/files/lib/migration_generator/migration_generator_rb.html +0 -149
  44. data/doc/files/lib/model_column_rb.html +0 -101
  45. data/doc/files/lib/model_generator/model_generator_rb.html +0 -164
  46. data/doc/files/lib/scaffold_generator/scaffold_generator_rb.html +0 -114
  47. data/doc/fr_class_index.html +0 -36
  48. data/doc/fr_file_index.html +0 -36
  49. data/doc/fr_method_index.html +0 -41
  50. data/doc/index.html +0 -24
  51. data/doc/rdoc-style.css +0 -208
@@ -1,200 +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::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>
@@ -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/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>
@@ -1,134 +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</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</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/database_rb.html">
59
- lib/database.rb
60
- </a>
61
- <br />
62
- <a href="../files/lib/genosaurus_helpers_rb.html">
63
- lib/genosaurus_helpers.rb
64
- </a>
65
- <br />
66
- <a href="../files/lib/helpers/orm_helpers_rb.html">
67
- lib/helpers/orm_helpers.rb
68
- </a>
69
- <br />
70
- <a href="../files/lib/model_column_rb.html">
71
- lib/model_column.rb
72
- </a>
73
- <br />
74
- </td>
75
- </tr>
76
-
77
- </table>
78
- </div>
79
- <!-- banner header -->
80
-
81
- <div id="bodyContent">
82
-
83
-
84
-
85
- <div id="contextContent">
86
-
87
- <div id="description">
88
- <p>
89
- AR db create/drop. Currently it supports 3 adapters: sqlite3, postgresql,
90
- and mysql
91
- </p>
92
- <p>
93
- ds - July 2008
94
- </p>
95
-
96
- </div>
97
-
98
-
99
- </div>
100
-
101
-
102
- </div>
103
-
104
-
105
- <!-- if includes -->
106
-
107
- <div id="section">
108
-
109
- <div id="class-list">
110
- <h3 class="section-bar">Classes and Modules</h3>
111
-
112
- Module <a href="Mack/Database.html" class="link">Mack::Database</a><br />
113
- Module <a href="Mack/ViewHelpers.html" class="link">Mack::ViewHelpers</a><br />
114
-
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
- <!-- if method_list -->
124
-
125
-
126
- </div>
127
-
128
-
129
- <div id="validator-badges">
130
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
131
- </div>
132
-
133
- </body>
134
- </html>
@@ -1,159 +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: MigrationGenerator</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">MigrationGenerator</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/lib/migration_generator/migration_generator_rb.html">
59
- lib/migration_generator/migration_generator.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
- Genosaurus
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
- This will generate a migration for your application.
84
- </p>
85
- <p>
86
- Example without columns:
87
- </p>
88
- <pre>
89
- rake generate:migration name=create_users
90
- </pre>
91
- <p>
92
- db/migrations/&lt;number&gt;_create_users.rb:
93
- </p>
94
- <pre>
95
- class CreateUsers &lt; ActiveRecord::Migration
96
- self.up
97
- end
98
-
99
- self.down
100
- end
101
- end
102
- </pre>
103
- <p>
104
- Example with columns:
105
- </p>
106
- <pre>
107
- rake generate:migration name=create_users cols=username:string,email_address:string,created_at:datetime,updated_at:datetime
108
- </pre>
109
- <p>
110
- db/migrations/&lt;number&gt;_create_users.rb:
111
- </p>
112
- <pre>
113
- class CreateUsers &lt; ActiveRecord::Migration
114
- self.up
115
- create_table :users do |t|
116
- t.column :username, :string
117
- t.column :email_address, :string
118
- t.column :created_at, :datetime
119
- t.column :updated_at, :datetime
120
- end
121
-
122
- self.down
123
- drop_table :users
124
- end
125
- end
126
- </pre>
127
-
128
- </div>
129
-
130
-
131
- </div>
132
-
133
-
134
- </div>
135
-
136
-
137
- <!-- if includes -->
138
-
139
- <div id="section">
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <!-- if method_list -->
149
-
150
-
151
- </div>
152
-
153
-
154
- <div id="validator-badges">
155
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
156
- </div>
157
-
158
- </body>
159
- </html>