dynamoid 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +4 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +40 -45
- data/README.markdown +55 -25
- data/Rakefile +31 -0
- data/VERSION +1 -1
- data/doc/Dynamoid.html +58 -42
- data/doc/Dynamoid/Adapter.html +666 -179
- data/doc/Dynamoid/Adapter/AwsSdk.html +752 -236
- data/doc/Dynamoid/Associations.html +28 -21
- data/doc/Dynamoid/Associations/Association.html +102 -49
- data/doc/Dynamoid/Associations/BelongsTo.html +28 -25
- data/doc/Dynamoid/Associations/ClassMethods.html +95 -52
- data/doc/Dynamoid/Associations/HasAndBelongsToMany.html +28 -25
- data/doc/Dynamoid/Associations/HasMany.html +28 -25
- data/doc/Dynamoid/Associations/HasOne.html +28 -25
- data/doc/Dynamoid/Associations/ManyAssociation.html +138 -94
- data/doc/Dynamoid/Associations/SingleAssociation.html +67 -38
- data/doc/Dynamoid/Components.html +60 -22
- data/doc/Dynamoid/Config.html +61 -44
- data/doc/Dynamoid/Config/Options.html +90 -61
- data/doc/Dynamoid/Criteria.html +28 -21
- data/doc/Dynamoid/Criteria/Chain.html +508 -100
- data/doc/Dynamoid/Criteria/ClassMethods.html +26 -19
- data/doc/Dynamoid/Dirty.html +424 -0
- data/doc/Dynamoid/Dirty/ClassMethods.html +174 -0
- data/doc/Dynamoid/Document.html +451 -84
- data/doc/Dynamoid/Document/ClassMethods.html +281 -102
- data/doc/Dynamoid/Errors.html +29 -22
- data/doc/Dynamoid/Errors/ConditionalCheckFailedException.html +141 -0
- data/doc/Dynamoid/Errors/DocumentNotValid.html +36 -25
- data/doc/Dynamoid/Errors/Error.html +27 -20
- data/doc/Dynamoid/Errors/InvalidField.html +27 -19
- data/doc/Dynamoid/Errors/InvalidQuery.html +131 -0
- data/doc/Dynamoid/Errors/MissingRangeKey.html +27 -19
- data/doc/Dynamoid/Fields.html +94 -77
- data/doc/Dynamoid/Fields/ClassMethods.html +166 -37
- data/doc/Dynamoid/Finders.html +28 -21
- data/doc/Dynamoid/Finders/ClassMethods.html +505 -78
- data/doc/Dynamoid/IdentityMap.html +492 -0
- data/doc/Dynamoid/IdentityMap/ClassMethods.html +534 -0
- data/doc/Dynamoid/Indexes.html +41 -28
- data/doc/Dynamoid/Indexes/ClassMethods.html +45 -29
- data/doc/Dynamoid/Indexes/Index.html +100 -62
- data/doc/Dynamoid/Middleware.html +115 -0
- data/doc/Dynamoid/Middleware/IdentityMap.html +264 -0
- data/doc/Dynamoid/Persistence.html +326 -85
- data/doc/Dynamoid/Persistence/ClassMethods.html +275 -109
- data/doc/Dynamoid/Validations.html +47 -31
- data/doc/_index.html +116 -71
- data/doc/class_list.html +13 -7
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +60 -44
- data/doc/file.LICENSE.html +26 -19
- data/doc/file.README.html +152 -48
- data/doc/file_list.html +14 -8
- data/doc/frames.html +20 -5
- data/doc/index.html +152 -48
- data/doc/js/app.js +52 -43
- data/doc/js/full_list.js +14 -9
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +446 -540
- data/doc/top-level-namespace.html +27 -20
- data/{Dynamoid.gemspec → dynamoid.gemspec} +21 -8
- data/lib/dynamoid/adapter.rb +11 -10
- data/lib/dynamoid/adapter/aws_sdk.rb +40 -19
- data/lib/dynamoid/components.rb +2 -1
- data/lib/dynamoid/criteria/chain.rb +29 -11
- data/lib/dynamoid/dirty.rb +6 -0
- data/lib/dynamoid/document.rb +34 -19
- data/lib/dynamoid/fields.rb +36 -30
- data/lib/dynamoid/finders.rb +7 -5
- data/lib/dynamoid/persistence.rb +37 -10
- data/spec/app/models/address.rb +2 -0
- data/spec/app/models/camel_case.rb +10 -0
- data/spec/app/models/car.rb +6 -0
- data/spec/app/models/nuclear_submarine.rb +5 -0
- data/spec/app/models/subscription.rb +2 -2
- data/spec/app/models/vehicle.rb +7 -0
- data/spec/dynamoid/adapter/aws_sdk_spec.rb +20 -11
- data/spec/dynamoid/adapter_spec.rb +67 -82
- data/spec/dynamoid/associations/association_spec.rb +30 -30
- data/spec/dynamoid/criteria/chain_spec.rb +56 -9
- data/spec/dynamoid/criteria_spec.rb +3 -0
- data/spec/dynamoid/dirty_spec.rb +8 -0
- data/spec/dynamoid/document_spec.rb +109 -47
- data/spec/dynamoid/fields_spec.rb +32 -3
- data/spec/dynamoid/finders_spec.rb +12 -0
- data/spec/dynamoid/persistence_spec.rb +73 -8
- data/spec/spec_helper.rb +1 -0
- data/spec/support/with_partitioning.rb +15 -0
- metadata +22 -9
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Dynamoid::Associations::BelongsTo
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
|
20
21
|
</script>
|
|
21
22
|
|
|
23
|
+
|
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
23
25
|
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
@@ -26,36 +28,41 @@
|
|
|
26
28
|
|
|
27
29
|
</head>
|
|
28
30
|
<body>
|
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
31
|
<div id="header">
|
|
34
32
|
<div id="menu">
|
|
35
33
|
|
|
36
|
-
<a href="../../_index.html">Index (B)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (B)</a> »
|
|
37
35
|
<span class='title'><span class='object_link'><a href="../../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> » <span class='title'><span class='object_link'><a href="../Associations.html" title="Dynamoid::Associations (module)">Associations</a></span></span>
|
|
38
36
|
»
|
|
39
37
|
<span class="title">BelongsTo</span>
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
|
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
41
|
</div>
|
|
44
42
|
|
|
45
43
|
<div id="search">
|
|
46
44
|
|
|
47
|
-
<a
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
48
49
|
|
|
49
|
-
<a
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
50
54
|
|
|
51
|
-
<a
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
52
59
|
|
|
53
60
|
</div>
|
|
54
61
|
<div class="clear"></div>
|
|
55
62
|
</div>
|
|
56
|
-
|
|
63
|
+
|
|
57
64
|
<iframe id="search_frame"></iframe>
|
|
58
|
-
|
|
65
|
+
|
|
59
66
|
<div id="content"><h1>Class: Dynamoid::Associations::BelongsTo
|
|
60
67
|
|
|
61
68
|
|
|
@@ -114,6 +121,7 @@
|
|
|
114
121
|
|
|
115
122
|
|
|
116
123
|
|
|
124
|
+
|
|
117
125
|
<h2>Method Summary</h2>
|
|
118
126
|
|
|
119
127
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="SingleAssociation.html" title="Dynamoid::Associations::SingleAssociation (module)">SingleAssociation</a></span></h3>
|
|
@@ -126,14 +134,9 @@
|
|
|
126
134
|
|
|
127
135
|
|
|
128
136
|
|
|
137
|
+
|
|
129
138
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
|
130
139
|
<p class="inherited"><span class='object_link'><a href="Association.html#find_target-instance_method" title="Dynamoid::Associations::Association#find_target (method)">#find_target</a></span>, <span class='object_link'><a href="Association.html#initialize-instance_method" title="Dynamoid::Associations::Association#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Association.html#loaded%3F-instance_method" title="Dynamoid::Associations::Association#loaded? (method)">#loaded?</a></span>, <span class='object_link'><a href="Association.html#reset-instance_method" title="Dynamoid::Associations::Association#reset (method)">#reset</a></span>, <span class='object_link'><a href="Association.html#target-instance_method" title="Dynamoid::Associations::Association#target (method)">#target</a></span></p>
|
|
131
|
-
<div id="constructor_details" class="method_details_list">
|
|
132
|
-
<h2>Constructor Details</h2>
|
|
133
|
-
|
|
134
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Association.html#initialize-instance_method" title="Dynamoid::Associations::Association#initialize (method)">Dynamoid::Associations::Association</a></span></p>
|
|
135
|
-
|
|
136
|
-
</div>
|
|
137
140
|
<div id="method_missing_details" class="method_details_list">
|
|
138
141
|
<h2>Dynamic Method Handling</h2>
|
|
139
142
|
<p class="notice super">
|
|
@@ -147,11 +150,11 @@
|
|
|
147
150
|
|
|
148
151
|
|
|
149
152
|
</div>
|
|
150
|
-
|
|
153
|
+
|
|
151
154
|
<div id="footer">
|
|
152
|
-
Generated on Thu
|
|
155
|
+
Generated on Thu Jun 27 21:59:14 2013 by
|
|
153
156
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
154
|
-
0.
|
|
157
|
+
0.8.6.1 (ruby-1.9.3).
|
|
155
158
|
</div>
|
|
156
159
|
|
|
157
160
|
</body>
|
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Module: Dynamoid::Associations::ClassMethods
|
|
8
8
|
|
|
9
|
-
— Documentation by YARD 0.
|
|
9
|
+
— Documentation by YARD 0.8.6.1
|
|
10
10
|
|
|
11
11
|
</title>
|
|
12
12
|
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
16
|
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
|
20
21
|
</script>
|
|
21
22
|
|
|
23
|
+
|
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
23
25
|
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
@@ -26,36 +28,41 @@
|
|
|
26
28
|
|
|
27
29
|
</head>
|
|
28
30
|
<body>
|
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
31
|
<div id="header">
|
|
34
32
|
<div id="menu">
|
|
35
33
|
|
|
36
|
-
<a href="../../_index.html">Index (C)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (C)</a> »
|
|
37
35
|
<span class='title'><span class='object_link'><a href="../../Dynamoid.html" title="Dynamoid (module)">Dynamoid</a></span></span> » <span class='title'><span class='object_link'><a href="../Associations.html" title="Dynamoid::Associations (module)">Associations</a></span></span>
|
|
38
36
|
»
|
|
39
37
|
<span class="title">ClassMethods</span>
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
|
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
41
|
</div>
|
|
44
42
|
|
|
45
43
|
<div id="search">
|
|
46
44
|
|
|
47
|
-
<a
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="../../class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
48
49
|
|
|
49
|
-
<a
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="../../method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
50
54
|
|
|
51
|
-
<a
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="../../file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
52
59
|
|
|
53
60
|
</div>
|
|
54
61
|
<div class="clear"></div>
|
|
55
62
|
</div>
|
|
56
|
-
|
|
63
|
+
|
|
57
64
|
<iframe id="search_frame"></iframe>
|
|
58
|
-
|
|
65
|
+
|
|
59
66
|
<div id="content"><h1>Module: Dynamoid::Associations::ClassMethods
|
|
60
67
|
|
|
61
68
|
|
|
@@ -106,6 +113,7 @@
|
|
|
106
113
|
|
|
107
114
|
|
|
108
115
|
|
|
116
|
+
|
|
109
117
|
|
|
110
118
|
|
|
111
119
|
<span class="summary_desc"><div class='inline'><p>create a belongs_to association for this document.</p>
|
|
@@ -128,6 +136,7 @@
|
|
|
128
136
|
|
|
129
137
|
|
|
130
138
|
|
|
139
|
+
|
|
131
140
|
|
|
132
141
|
|
|
133
142
|
<span class="summary_desc"><div class='inline'><p>create a has_and_belongs_to_many association for this document.</p>
|
|
@@ -150,6 +159,7 @@
|
|
|
150
159
|
|
|
151
160
|
|
|
152
161
|
|
|
162
|
+
|
|
153
163
|
|
|
154
164
|
|
|
155
165
|
<span class="summary_desc"><div class='inline'><p>create a has_many association for this document.</p>
|
|
@@ -172,6 +182,7 @@
|
|
|
172
182
|
|
|
173
183
|
|
|
174
184
|
|
|
185
|
+
|
|
175
186
|
|
|
176
187
|
|
|
177
188
|
<span class="summary_desc"><div class='inline'><p>create a has_one association for this document.</p>
|
|
@@ -187,16 +198,18 @@
|
|
|
187
198
|
|
|
188
199
|
<div id="instance_method_details" class="method_details_list">
|
|
189
200
|
<h2>Instance Method Details</h2>
|
|
190
|
-
|
|
201
|
+
|
|
191
202
|
|
|
192
203
|
<div class="method_details first">
|
|
193
|
-
<
|
|
204
|
+
<h3 class="signature first" id="belongs_to-instance_method">
|
|
194
205
|
|
|
195
206
|
- (<tt>Object</tt>) <strong>belongs_to</strong>(name, options = {})
|
|
196
207
|
|
|
197
208
|
|
|
198
209
|
|
|
199
|
-
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
</h3><div class="docstring">
|
|
200
213
|
<div class="discussion">
|
|
201
214
|
<p>create a belongs_to association for this document.</p>
|
|
202
215
|
|
|
@@ -204,7 +217,7 @@
|
|
|
204
217
|
</div>
|
|
205
218
|
</div>
|
|
206
219
|
<div class="tags">
|
|
207
|
-
<
|
|
220
|
+
<p class="tag_title">Parameters:</p>
|
|
208
221
|
<ul class="param">
|
|
209
222
|
|
|
210
223
|
<li>
|
|
@@ -246,7 +259,7 @@
|
|
|
246
259
|
|
|
247
260
|
|
|
248
261
|
|
|
249
|
-
<
|
|
262
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
250
263
|
<ul class="option">
|
|
251
264
|
|
|
252
265
|
<li>
|
|
@@ -255,8 +268,10 @@
|
|
|
255
268
|
<span class="default">
|
|
256
269
|
|
|
257
270
|
</span>
|
|
258
|
-
|
|
271
|
+
|
|
272
|
+
— <div class='inline'><p>the target class of the has_one association; that is, the has_many or has_one class</p>
|
|
259
273
|
</div>
|
|
274
|
+
|
|
260
275
|
</li>
|
|
261
276
|
|
|
262
277
|
<li>
|
|
@@ -265,8 +280,10 @@
|
|
|
265
280
|
<span class="default">
|
|
266
281
|
|
|
267
282
|
</span>
|
|
268
|
-
|
|
283
|
+
|
|
284
|
+
— <div class='inline'><p>the name of the target class of the association; that is, the name of the has_many or has_one class</p>
|
|
269
285
|
</div>
|
|
286
|
+
|
|
270
287
|
</li>
|
|
271
288
|
|
|
272
289
|
<li>
|
|
@@ -275,14 +292,16 @@
|
|
|
275
292
|
<span class="default">
|
|
276
293
|
|
|
277
294
|
</span>
|
|
278
|
-
|
|
295
|
+
|
|
296
|
+
— <div class='inline'><p>the name of the association on the target class; that is, if the class has a has_many or has_one association, the name of that association</p>
|
|
279
297
|
</div>
|
|
298
|
+
|
|
280
299
|
</li>
|
|
281
300
|
|
|
282
301
|
</ul>
|
|
283
302
|
|
|
284
303
|
|
|
285
|
-
<
|
|
304
|
+
<p class="tag_title">Since:</p>
|
|
286
305
|
<ul class="since">
|
|
287
306
|
|
|
288
307
|
<li>
|
|
@@ -320,13 +339,15 @@
|
|
|
320
339
|
</div>
|
|
321
340
|
|
|
322
341
|
<div class="method_details ">
|
|
323
|
-
<
|
|
342
|
+
<h3 class="signature " id="has_and_belongs_to_many-instance_method">
|
|
324
343
|
|
|
325
344
|
- (<tt>Object</tt>) <strong>has_and_belongs_to_many</strong>(name, options = {})
|
|
326
345
|
|
|
327
346
|
|
|
328
347
|
|
|
329
|
-
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
</h3><div class="docstring">
|
|
330
351
|
<div class="discussion">
|
|
331
352
|
<p>create a has_and_belongs_to_many association for this document.</p>
|
|
332
353
|
|
|
@@ -334,7 +355,7 @@
|
|
|
334
355
|
</div>
|
|
335
356
|
</div>
|
|
336
357
|
<div class="tags">
|
|
337
|
-
<
|
|
358
|
+
<p class="tag_title">Parameters:</p>
|
|
338
359
|
<ul class="param">
|
|
339
360
|
|
|
340
361
|
<li>
|
|
@@ -376,7 +397,7 @@
|
|
|
376
397
|
|
|
377
398
|
|
|
378
399
|
|
|
379
|
-
<
|
|
400
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
380
401
|
<ul class="option">
|
|
381
402
|
|
|
382
403
|
<li>
|
|
@@ -385,8 +406,10 @@
|
|
|
385
406
|
<span class="default">
|
|
386
407
|
|
|
387
408
|
</span>
|
|
388
|
-
|
|
409
|
+
|
|
410
|
+
— <div class='inline'><p>the target class of the has_and_belongs_to_many association; that is, the belongs_to class</p>
|
|
389
411
|
</div>
|
|
412
|
+
|
|
390
413
|
</li>
|
|
391
414
|
|
|
392
415
|
<li>
|
|
@@ -395,8 +418,10 @@
|
|
|
395
418
|
<span class="default">
|
|
396
419
|
|
|
397
420
|
</span>
|
|
398
|
-
|
|
421
|
+
|
|
422
|
+
— <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
|
|
399
423
|
</div>
|
|
424
|
+
|
|
400
425
|
</li>
|
|
401
426
|
|
|
402
427
|
<li>
|
|
@@ -405,14 +430,16 @@
|
|
|
405
430
|
<span class="default">
|
|
406
431
|
|
|
407
432
|
</span>
|
|
408
|
-
|
|
433
|
+
|
|
434
|
+
— <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
|
|
409
435
|
</div>
|
|
436
|
+
|
|
410
437
|
</li>
|
|
411
438
|
|
|
412
439
|
</ul>
|
|
413
440
|
|
|
414
441
|
|
|
415
|
-
<
|
|
442
|
+
<p class="tag_title">Since:</p>
|
|
416
443
|
<ul class="since">
|
|
417
444
|
|
|
418
445
|
<li>
|
|
@@ -450,13 +477,15 @@
|
|
|
450
477
|
</div>
|
|
451
478
|
|
|
452
479
|
<div class="method_details ">
|
|
453
|
-
<
|
|
480
|
+
<h3 class="signature " id="has_many-instance_method">
|
|
454
481
|
|
|
455
482
|
- (<tt>Object</tt>) <strong>has_many</strong>(name, options = {})
|
|
456
483
|
|
|
457
484
|
|
|
458
485
|
|
|
459
|
-
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
</h3><div class="docstring">
|
|
460
489
|
<div class="discussion">
|
|
461
490
|
<p>create a has_many association for this document.</p>
|
|
462
491
|
|
|
@@ -464,7 +493,7 @@
|
|
|
464
493
|
</div>
|
|
465
494
|
</div>
|
|
466
495
|
<div class="tags">
|
|
467
|
-
<
|
|
496
|
+
<p class="tag_title">Parameters:</p>
|
|
468
497
|
<ul class="param">
|
|
469
498
|
|
|
470
499
|
<li>
|
|
@@ -506,7 +535,7 @@
|
|
|
506
535
|
|
|
507
536
|
|
|
508
537
|
|
|
509
|
-
<
|
|
538
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
510
539
|
<ul class="option">
|
|
511
540
|
|
|
512
541
|
<li>
|
|
@@ -515,8 +544,10 @@
|
|
|
515
544
|
<span class="default">
|
|
516
545
|
|
|
517
546
|
</span>
|
|
518
|
-
|
|
547
|
+
|
|
548
|
+
— <div class='inline'><p>the target class of the has_many association; that is, the belongs_to class</p>
|
|
519
549
|
</div>
|
|
550
|
+
|
|
520
551
|
</li>
|
|
521
552
|
|
|
522
553
|
<li>
|
|
@@ -525,8 +556,10 @@
|
|
|
525
556
|
<span class="default">
|
|
526
557
|
|
|
527
558
|
</span>
|
|
528
|
-
|
|
559
|
+
|
|
560
|
+
— <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
|
|
529
561
|
</div>
|
|
562
|
+
|
|
530
563
|
</li>
|
|
531
564
|
|
|
532
565
|
<li>
|
|
@@ -535,14 +568,16 @@
|
|
|
535
568
|
<span class="default">
|
|
536
569
|
|
|
537
570
|
</span>
|
|
538
|
-
|
|
571
|
+
|
|
572
|
+
— <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
|
|
539
573
|
</div>
|
|
574
|
+
|
|
540
575
|
</li>
|
|
541
576
|
|
|
542
577
|
</ul>
|
|
543
578
|
|
|
544
579
|
|
|
545
|
-
<
|
|
580
|
+
<p class="tag_title">Since:</p>
|
|
546
581
|
<ul class="since">
|
|
547
582
|
|
|
548
583
|
<li>
|
|
@@ -580,13 +615,15 @@
|
|
|
580
615
|
</div>
|
|
581
616
|
|
|
582
617
|
<div class="method_details ">
|
|
583
|
-
<
|
|
618
|
+
<h3 class="signature " id="has_one-instance_method">
|
|
584
619
|
|
|
585
620
|
- (<tt>Object</tt>) <strong>has_one</strong>(name, options = {})
|
|
586
621
|
|
|
587
622
|
|
|
588
623
|
|
|
589
|
-
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
</h3><div class="docstring">
|
|
590
627
|
<div class="discussion">
|
|
591
628
|
<p>create a has_one association for this document.</p>
|
|
592
629
|
|
|
@@ -594,7 +631,7 @@
|
|
|
594
631
|
</div>
|
|
595
632
|
</div>
|
|
596
633
|
<div class="tags">
|
|
597
|
-
<
|
|
634
|
+
<p class="tag_title">Parameters:</p>
|
|
598
635
|
<ul class="param">
|
|
599
636
|
|
|
600
637
|
<li>
|
|
@@ -636,7 +673,7 @@
|
|
|
636
673
|
|
|
637
674
|
|
|
638
675
|
|
|
639
|
-
<
|
|
676
|
+
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
|
640
677
|
<ul class="option">
|
|
641
678
|
|
|
642
679
|
<li>
|
|
@@ -645,8 +682,10 @@
|
|
|
645
682
|
<span class="default">
|
|
646
683
|
|
|
647
684
|
</span>
|
|
648
|
-
|
|
685
|
+
|
|
686
|
+
— <div class='inline'><p>the target class of the has_one association; that is, the belongs_to class</p>
|
|
649
687
|
</div>
|
|
688
|
+
|
|
650
689
|
</li>
|
|
651
690
|
|
|
652
691
|
<li>
|
|
@@ -655,8 +694,10 @@
|
|
|
655
694
|
<span class="default">
|
|
656
695
|
|
|
657
696
|
</span>
|
|
658
|
-
|
|
697
|
+
|
|
698
|
+
— <div class='inline'><p>the name of the target class of the association; that is, the name of the belongs_to class</p>
|
|
659
699
|
</div>
|
|
700
|
+
|
|
660
701
|
</li>
|
|
661
702
|
|
|
662
703
|
<li>
|
|
@@ -665,14 +706,16 @@
|
|
|
665
706
|
<span class="default">
|
|
666
707
|
|
|
667
708
|
</span>
|
|
668
|
-
|
|
709
|
+
|
|
710
|
+
— <div class='inline'><p>the name of the association on the target class; that is, if the class has a belongs_to association, the name of that association</p>
|
|
669
711
|
</div>
|
|
712
|
+
|
|
670
713
|
</li>
|
|
671
714
|
|
|
672
715
|
</ul>
|
|
673
716
|
|
|
674
717
|
|
|
675
|
-
<
|
|
718
|
+
<p class="tag_title">Since:</p>
|
|
676
719
|
<ul class="since">
|
|
677
720
|
|
|
678
721
|
<li>
|
|
@@ -712,11 +755,11 @@
|
|
|
712
755
|
</div>
|
|
713
756
|
|
|
714
757
|
</div>
|
|
715
|
-
|
|
758
|
+
|
|
716
759
|
<div id="footer">
|
|
717
|
-
Generated on Thu
|
|
760
|
+
Generated on Thu Jun 27 21:59:13 2013 by
|
|
718
761
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
719
|
-
0.
|
|
762
|
+
0.8.6.1 (ruby-1.9.3).
|
|
720
763
|
</div>
|
|
721
764
|
|
|
722
765
|
</body>
|