mack-data_mapper 0.7.1 → 0.7.1.1
Sign up to get free protection for your applications and to get access to all the features.
- metadata +3 -39
- data/doc/classes/DataMapper/Resource.html +0 -154
- data/doc/classes/Mack.html +0 -135
- data/doc/classes/Mack/DataMapper/Session.html +0 -124
- data/doc/classes/Mack/Database.html +0 -311
- data/doc/classes/Mack/Database/Generators.html +0 -140
- data/doc/classes/Mack/Database/Migrations.html +0 -206
- data/doc/classes/Mack/SessionStore/DataMapper.html +0 -262
- data/doc/classes/Mack/Testing/DataMapperHelpers.html +0 -151
- data/doc/classes/Mack/ViewHelpers/DataMapperHelpers.html +0 -187
- data/doc/classes/MigrationGenerator.html +0 -161
- data/doc/classes/ModelGenerator.html +0 -183
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -230
- data/doc/files/lib/mack-data_mapper/database_migrations_rb.html +0 -115
- data/doc/files/lib/mack-data_mapper/database_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/dm_patches/dm-timestamps_rb.html +0 -116
- data/doc/files/lib/mack-data_mapper/dm_patches/migrations_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/dm_patches/model_rb.html +0 -158
- data/doc/files/lib/mack-data_mapper/dm_patches/property_set_rb.html +0 -125
- data/doc/files/lib/mack-data_mapper/dm_patches/validations_rb.html +0 -125
- data/doc/files/lib/mack-data_mapper/generators_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/helpers/orm_helpers_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/migration_generator/migration_generator_rb.html +0 -151
- data/doc/files/lib/mack-data_mapper/model_generator/model_generator_rb.html +0 -173
- data/doc/files/lib/mack-data_mapper/resource_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/runner_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/sessions/data_mapper_session_store_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/sessions/session_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper/test_extensions_rb.html +0 -109
- data/doc/files/lib/mack-data_mapper_rb.html +0 -110
- data/doc/files/lib/mack-data_mapper_tasks_rb.html +0 -108
- data/doc/fr_class_index.html +0 -37
- data/doc/fr_file_index.html +0 -45
- data/doc/fr_method_index.html +0 -42
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,311 +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::Database</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::Database</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/mack-data_mapper/database_rb.html">
|
59
|
-
lib/mack-data_mapper/database.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/lib/mack-data_mapper/database_migrations_rb.html">
|
63
|
-
lib/mack-data_mapper/database_migrations.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../../files/lib/mack-data_mapper/generators_rb.html">
|
67
|
-
lib/mack-data_mapper/generators.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
</td>
|
71
|
-
</tr>
|
72
|
-
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="method-list">
|
88
|
-
<h3 class="section-bar">Methods</h3>
|
89
|
-
|
90
|
-
<div class="name-list">
|
91
|
-
<a href="#M000008">create</a>
|
92
|
-
<a href="#M000009">drop</a>
|
93
|
-
<a href="#M000011">dump_structure</a>
|
94
|
-
<a href="#M000007">establish_connection</a>
|
95
|
-
<a href="#M000010">load_structure</a>
|
96
|
-
</div>
|
97
|
-
</div>
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
|
102
|
-
<!-- if includes -->
|
103
|
-
|
104
|
-
<div id="section">
|
105
|
-
|
106
|
-
<div id="class-list">
|
107
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
108
|
-
|
109
|
-
Module <a href="Database/Generators.html" class="link">Mack::Database::Generators</a><br />
|
110
|
-
Module <a href="Database/Migrations.html" class="link">Mack::Database::Migrations</a><br />
|
111
|
-
|
112
|
-
</div>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<!-- if method_list -->
|
121
|
-
<div id="methods">
|
122
|
-
<h3 class="section-bar">Public Class methods</h3>
|
123
|
-
|
124
|
-
<div id="method-M000008" class="method-detail">
|
125
|
-
<a name="M000008"></a>
|
126
|
-
|
127
|
-
<div class="method-heading">
|
128
|
-
<a href="#M000008" class="method-signature">
|
129
|
-
<span class="method-name">create</span><span class="method-args">(env = Mack.env, repis = :default)</span>
|
130
|
-
</a>
|
131
|
-
</div>
|
132
|
-
|
133
|
-
<div class="method-description">
|
134
|
-
<p>
|
135
|
-
Creates a database, if it doesn‘t already exist for the specified
|
136
|
-
environment
|
137
|
-
</p>
|
138
|
-
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
140
|
-
<div class="method-source-code" id="M000008-source">
|
141
|
-
<pre>
|
142
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 20</span>
|
143
|
-
20: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
|
144
|
-
21: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
|
145
|
-
22: <span class="ruby-identifier">create_database</span>(<span class="ruby-identifier">repis</span>)
|
146
|
-
23: <span class="ruby-keyword kw">end</span>
|
147
|
-
</pre>
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
|
152
|
-
<div id="method-M000009" class="method-detail">
|
153
|
-
<a name="M000009"></a>
|
154
|
-
|
155
|
-
<div class="method-heading">
|
156
|
-
<a href="#M000009" class="method-signature">
|
157
|
-
<span class="method-name">drop</span><span class="method-args">(env = Mack.env, repis = :default)</span>
|
158
|
-
</a>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<div class="method-description">
|
162
|
-
<p>
|
163
|
-
Drops a database, if it exists for the specified environment
|
164
|
-
</p>
|
165
|
-
<p><a class="source-toggle" href="#"
|
166
|
-
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
167
|
-
<div class="method-source-code" id="M000009-source">
|
168
|
-
<pre>
|
169
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 26</span>
|
170
|
-
26: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drop</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
|
171
|
-
27: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
|
172
|
-
28: <span class="ruby-identifier">drop_database</span>(<span class="ruby-identifier">repis</span>)
|
173
|
-
29: <span class="ruby-keyword kw">end</span>
|
174
|
-
</pre>
|
175
|
-
</div>
|
176
|
-
</div>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div id="method-M000011" class="method-detail">
|
180
|
-
<a name="M000011"></a>
|
181
|
-
|
182
|
-
<div class="method-heading">
|
183
|
-
<a href="#M000011" class="method-signature">
|
184
|
-
<span class="method-name">dump_structure</span><span class="method-args">(env = Mack.env, repis = :default)</span>
|
185
|
-
</a>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
<div class="method-description">
|
189
|
-
<p>
|
190
|
-
Dumps the structure of the database to a file.
|
191
|
-
</p>
|
192
|
-
<p><a class="source-toggle" href="#"
|
193
|
-
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
194
|
-
<div class="method-source-code" id="M000011-source">
|
195
|
-
<pre>
|
196
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 48</span>
|
197
|
-
48: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dump_structure</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
|
198
|
-
49: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
|
199
|
-
50: <span class="ruby-identifier">adapter</span> = <span class="ruby-identifier">repository</span>(<span class="ruby-identifier">repis</span>).<span class="ruby-identifier">adapter</span>
|
200
|
-
51: <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">uri</span>
|
201
|
-
52: <span class="ruby-identifier">structure</span> = <span class="ruby-value str">""</span>
|
202
|
-
53: <span class="ruby-identifier">output_file</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">db</span>(<span class="ruby-node">"#{env}_schema_structure.sql"</span>)
|
203
|
-
54: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>
|
204
|
-
55: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Mysql/</span>
|
205
|
-
56: <span class="ruby-identifier">sql</span> = <span class="ruby-value str">"SHOW TABLES"</span>
|
206
|
-
57: <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">query</span>(<span class="ruby-identifier">sql</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">res</span><span class="ruby-operator">|</span>
|
207
|
-
58: <span class="ruby-identifier">show</span> = <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">query</span>(<span class="ruby-node">"SHOW CREATE TABLE #{res}"</span>).<span class="ruby-identifier">first</span>
|
208
|
-
59: <span class="ruby-identifier">structure</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">show</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">"create table"</span>.<span class="ruby-identifier">to_sym</span>]
|
209
|
-
60: <span class="ruby-identifier">structure</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">";\n\n"</span>
|
210
|
-
61: <span class="ruby-keyword kw">end</span>
|
211
|
-
62: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">output_file</span>, <span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">structure</span>}
|
212
|
-
63: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Postgres/</span>
|
213
|
-
64: <span class="ruby-node">`pg_dump -i -U "#{uri.user}" -s -x -O -n #{ENV["SCHEMA"] ||= "public"} -f #{output_file} #{uri.basename}`</span>
|
214
|
-
65: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Sqlite3/</span>
|
215
|
-
66: <span class="ruby-identifier">db_dir</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">db</span>
|
216
|
-
67: <span class="ruby-node">`sqlite3 #{File.join(db_dir, uri.basename)} .schema > #{output_file}`</span>
|
217
|
-
68: <span class="ruby-keyword kw">else</span>
|
218
|
-
69: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Task not supported for '#{repository(repis).adapter.class.name}'"</span>
|
219
|
-
70: <span class="ruby-keyword kw">end</span>
|
220
|
-
71: <span class="ruby-keyword kw">end</span>
|
221
|
-
</pre>
|
222
|
-
</div>
|
223
|
-
</div>
|
224
|
-
</div>
|
225
|
-
|
226
|
-
<div id="method-M000007" class="method-detail">
|
227
|
-
<a name="M000007"></a>
|
228
|
-
|
229
|
-
<div class="method-heading">
|
230
|
-
<a href="#M000007" class="method-signature">
|
231
|
-
<span class="method-name">establish_connection</span><span class="method-args">(env = Mack.env)</span>
|
232
|
-
</a>
|
233
|
-
</div>
|
234
|
-
|
235
|
-
<div class="method-description">
|
236
|
-
<p>
|
237
|
-
Sets up and establishes connections to the database based on the specified
|
238
|
-
environment and the settings in the database.yml file.
|
239
|
-
</p>
|
240
|
-
<p><a class="source-toggle" href="#"
|
241
|
-
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
242
|
-
<div class="method-source-code" id="M000007-source">
|
243
|
-
<pre>
|
244
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 6</span>
|
245
|
-
6: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>)
|
246
|
-
7: <span class="ruby-identifier">dbs</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Paths</span>.<span class="ruby-identifier">config</span>(<span class="ruby-value str">"database.yml"</span>))).<span class="ruby-identifier">result</span>)
|
247
|
-
8: <span class="ruby-identifier">settings</span> = <span class="ruby-identifier">dbs</span>[<span class="ruby-identifier">env</span>]
|
248
|
-
9: <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">symbolize_keys!</span>
|
249
|
-
10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">settings</span>[<span class="ruby-identifier">:default</span>]
|
250
|
-
11: <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
251
|
-
12: <span class="ruby-operator">::</span><span class="ruby-constant">DataMapper</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>.<span class="ruby-identifier">symbolize_keys</span>)
|
252
|
-
13: <span class="ruby-keyword kw">end</span>
|
253
|
-
14: <span class="ruby-keyword kw">else</span>
|
254
|
-
15: <span class="ruby-operator">::</span><span class="ruby-constant">DataMapper</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-identifier">:default</span>, <span class="ruby-identifier">settings</span>)
|
255
|
-
16: <span class="ruby-keyword kw">end</span>
|
256
|
-
17: <span class="ruby-keyword kw">end</span>
|
257
|
-
</pre>
|
258
|
-
</div>
|
259
|
-
</div>
|
260
|
-
</div>
|
261
|
-
|
262
|
-
<div id="method-M000010" class="method-detail">
|
263
|
-
<a name="M000010"></a>
|
264
|
-
|
265
|
-
<div class="method-heading">
|
266
|
-
<a href="#M000010" class="method-signature">
|
267
|
-
<span class="method-name">load_structure</span><span class="method-args">(file, env = Mack.env, repis = :default)</span>
|
268
|
-
</a>
|
269
|
-
</div>
|
270
|
-
|
271
|
-
<div class="method-description">
|
272
|
-
<p>
|
273
|
-
Loads the structure of the given file into the database
|
274
|
-
</p>
|
275
|
-
<p><a class="source-toggle" href="#"
|
276
|
-
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
277
|
-
<div class="method-source-code" id="M000010-source">
|
278
|
-
<pre>
|
279
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 32</span>
|
280
|
-
32: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_structure</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
|
281
|
-
33: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
|
282
|
-
34: <span class="ruby-identifier">adapter</span> = <span class="ruby-identifier">repository</span>(<span class="ruby-identifier">repis</span>).<span class="ruby-identifier">adapter</span>
|
283
|
-
35: <span class="ruby-identifier">sql</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">file</span>)
|
284
|
-
36: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>
|
285
|
-
37: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/Mysql/</span>
|
286
|
-
38: <span class="ruby-identifier">sql</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">";"</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
287
|
-
39: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">strip!</span>
|
288
|
-
40: <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">s</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">blank?</span>
|
289
|
-
41: <span class="ruby-keyword kw">end</span>
|
290
|
-
42: <span class="ruby-keyword kw">else</span>
|
291
|
-
43: <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">sql</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sql</span>.<span class="ruby-identifier">blank?</span>
|
292
|
-
44: <span class="ruby-keyword kw">end</span>
|
293
|
-
45: <span class="ruby-keyword kw">end</span>
|
294
|
-
</pre>
|
295
|
-
</div>
|
296
|
-
</div>
|
297
|
-
</div>
|
298
|
-
|
299
|
-
|
300
|
-
</div>
|
301
|
-
|
302
|
-
|
303
|
-
</div>
|
304
|
-
|
305
|
-
|
306
|
-
<div id="validator-badges">
|
307
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
308
|
-
</div>
|
309
|
-
|
310
|
-
</body>
|
311
|
-
</html>
|
@@ -1,140 +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::Database::Generators</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::Database::Generators</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/mack-data_mapper/generators_rb.html">
|
59
|
-
lib/mack-data_mapper/generators.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="#M000012">controller_template_location</a>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
<!-- if includes -->
|
91
|
-
|
92
|
-
<div id="section">
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<!-- if method_list -->
|
102
|
-
<div id="methods">
|
103
|
-
<h3 class="section-bar">Public Class methods</h3>
|
104
|
-
|
105
|
-
<div id="method-M000012" class="method-detail">
|
106
|
-
<a name="M000012"></a>
|
107
|
-
|
108
|
-
<div class="method-heading">
|
109
|
-
<a href="#M000012" class="method-signature">
|
110
|
-
<span class="method-name">controller_template_location</span><span class="method-args">()</span>
|
111
|
-
</a>
|
112
|
-
</div>
|
113
|
-
|
114
|
-
<div class="method-description">
|
115
|
-
<p><a class="source-toggle" href="#"
|
116
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
117
|
-
<div class="method-source-code" id="M000012-source">
|
118
|
-
<pre>
|
119
|
-
<span class="ruby-comment cmt"># File lib/mack-data_mapper/generators.rb, line 5</span>
|
120
|
-
5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">controller_template_location</span>
|
121
|
-
6: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">"scaffold_generator"</span>, <span class="ruby-value str">"templates"</span>, <span class="ruby-value str">"app"</span>, <span class="ruby-value str">"controllers"</span>, <span class="ruby-value str">"controller.rb.template"</span>)
|
122
|
-
7: <span class="ruby-keyword kw">end</span>
|
123
|
-
</pre>
|
124
|
-
</div>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
|
129
|
-
</div>
|
130
|
-
|
131
|
-
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
<div id="validator-badges">
|
136
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
137
|
-
</div>
|
138
|
-
|
139
|
-
</body>
|
140
|
-
</html>
|