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::HasAndBelongsToMany
|
|
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 (H)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (H)</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">HasAndBelongsToMany</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::HasAndBelongsToMany
|
|
60
67
|
|
|
61
68
|
|
|
@@ -119,6 +126,7 @@
|
|
|
119
126
|
|
|
120
127
|
|
|
121
128
|
|
|
129
|
+
|
|
122
130
|
<h2>Method Summary</h2>
|
|
123
131
|
|
|
124
132
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="ManyAssociation.html" title="Dynamoid::Associations::ManyAssociation (module)">ManyAssociation</a></span></h3>
|
|
@@ -132,14 +140,9 @@
|
|
|
132
140
|
|
|
133
141
|
|
|
134
142
|
|
|
143
|
+
|
|
135
144
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
|
136
145
|
<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>
|
|
137
|
-
<div id="constructor_details" class="method_details_list">
|
|
138
|
-
<h2>Constructor Details</h2>
|
|
139
|
-
|
|
140
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="ManyAssociation.html#initialize-instance_method" title="Dynamoid::Associations::ManyAssociation#initialize (method)">Dynamoid::Associations::ManyAssociation</a></span></p>
|
|
141
|
-
|
|
142
|
-
</div>
|
|
143
146
|
<div id="method_missing_details" class="method_details_list">
|
|
144
147
|
<h2>Dynamic Method Handling</h2>
|
|
145
148
|
<p class="notice super">
|
|
@@ -153,11 +156,11 @@
|
|
|
153
156
|
|
|
154
157
|
|
|
155
158
|
</div>
|
|
156
|
-
|
|
159
|
+
|
|
157
160
|
<div id="footer">
|
|
158
|
-
Generated on Thu
|
|
161
|
+
Generated on Thu Jun 27 21:59:14 2013 by
|
|
159
162
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
160
|
-
0.
|
|
163
|
+
0.8.6.1 (ruby-1.9.3).
|
|
161
164
|
</div>
|
|
162
165
|
|
|
163
166
|
</body>
|
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Dynamoid::Associations::HasMany
|
|
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 (H)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (H)</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">HasMany</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::HasMany
|
|
60
67
|
|
|
61
68
|
|
|
@@ -119,6 +126,7 @@
|
|
|
119
126
|
|
|
120
127
|
|
|
121
128
|
|
|
129
|
+
|
|
122
130
|
<h2>Method Summary</h2>
|
|
123
131
|
|
|
124
132
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="ManyAssociation.html" title="Dynamoid::Associations::ManyAssociation (module)">ManyAssociation</a></span></h3>
|
|
@@ -132,14 +140,9 @@
|
|
|
132
140
|
|
|
133
141
|
|
|
134
142
|
|
|
143
|
+
|
|
135
144
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
|
136
145
|
<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>
|
|
137
|
-
<div id="constructor_details" class="method_details_list">
|
|
138
|
-
<h2>Constructor Details</h2>
|
|
139
|
-
|
|
140
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="ManyAssociation.html#initialize-instance_method" title="Dynamoid::Associations::ManyAssociation#initialize (method)">Dynamoid::Associations::ManyAssociation</a></span></p>
|
|
141
|
-
|
|
142
|
-
</div>
|
|
143
146
|
<div id="method_missing_details" class="method_details_list">
|
|
144
147
|
<h2>Dynamic Method Handling</h2>
|
|
145
148
|
<p class="notice super">
|
|
@@ -153,11 +156,11 @@
|
|
|
153
156
|
|
|
154
157
|
|
|
155
158
|
</div>
|
|
156
|
-
|
|
159
|
+
|
|
157
160
|
<div id="footer">
|
|
158
|
-
Generated on Thu
|
|
161
|
+
Generated on Thu Jun 27 21:59:14 2013 by
|
|
159
162
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
160
|
-
0.
|
|
163
|
+
0.8.6.1 (ruby-1.9.3).
|
|
161
164
|
</div>
|
|
162
165
|
|
|
163
166
|
</body>
|
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
<title>
|
|
7
7
|
Class: Dynamoid::Associations::HasOne
|
|
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 (H)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (H)</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">HasOne</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::HasOne
|
|
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::ManyAssociation
|
|
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 (M)</a> »
|
|
34
|
+
<a href="../../_index.html">Index (M)</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">ManyAssociation</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::ManyAssociation
|
|
60
67
|
|
|
61
68
|
|
|
@@ -102,6 +109,7 @@
|
|
|
102
109
|
</span>
|
|
103
110
|
|
|
104
111
|
|
|
112
|
+
|
|
105
113
|
|
|
106
114
|
|
|
107
115
|
|
|
@@ -149,6 +157,7 @@
|
|
|
149
157
|
|
|
150
158
|
|
|
151
159
|
|
|
160
|
+
|
|
152
161
|
|
|
153
162
|
|
|
154
163
|
<span class="summary_desc"><div class='inline'><p>Add an object or array of objects to an association.</p>
|
|
@@ -171,6 +180,7 @@
|
|
|
171
180
|
|
|
172
181
|
|
|
173
182
|
|
|
183
|
+
|
|
174
184
|
|
|
175
185
|
|
|
176
186
|
<span class="summary_desc"><div class='inline'><p>Is this array equal to the association's records?.</p>
|
|
@@ -193,6 +203,7 @@
|
|
|
193
203
|
|
|
194
204
|
|
|
195
205
|
|
|
206
|
+
|
|
196
207
|
|
|
197
208
|
|
|
198
209
|
<span class="summary_desc"><div class='inline'><p>Create a new instance of the target class and add it directly to the association.</p>
|
|
@@ -215,6 +226,7 @@
|
|
|
215
226
|
|
|
216
227
|
|
|
217
228
|
|
|
229
|
+
|
|
218
230
|
|
|
219
231
|
|
|
220
232
|
<span class="summary_desc"><div class='inline'><p>Create a new instance of the target class and add it directly to the association.</p>
|
|
@@ -237,6 +249,7 @@
|
|
|
237
249
|
|
|
238
250
|
|
|
239
251
|
|
|
252
|
+
|
|
240
253
|
|
|
241
254
|
|
|
242
255
|
<span class="summary_desc"><div class='inline'><p>Deletes an object or array of objects from the association.</p>
|
|
@@ -259,6 +272,7 @@
|
|
|
259
272
|
|
|
260
273
|
|
|
261
274
|
|
|
275
|
+
|
|
262
276
|
|
|
263
277
|
|
|
264
278
|
<span class="summary_desc"><div class='inline'><p>Deletes all members of the association and removes them from the association.</p>
|
|
@@ -281,6 +295,7 @@
|
|
|
281
295
|
|
|
282
296
|
|
|
283
297
|
|
|
298
|
+
|
|
284
299
|
|
|
285
300
|
|
|
286
301
|
<span class="summary_desc"><div class='inline'><p>Destroys all members of the association and removes them from the association.</p>
|
|
@@ -303,6 +318,7 @@
|
|
|
303
318
|
|
|
304
319
|
|
|
305
320
|
|
|
321
|
+
|
|
306
322
|
|
|
307
323
|
|
|
308
324
|
<span class="summary_desc"><div class='inline'><p>Create a new instance of the target class and add it directly to the association.</p>
|
|
@@ -325,6 +341,7 @@
|
|
|
325
341
|
|
|
326
342
|
|
|
327
343
|
|
|
344
|
+
|
|
328
345
|
|
|
329
346
|
|
|
330
347
|
<span class="summary_desc"><div class='inline'><p>The records associated to the source.</p>
|
|
@@ -347,6 +364,7 @@
|
|
|
347
364
|
|
|
348
365
|
|
|
349
366
|
|
|
367
|
+
|
|
350
368
|
|
|
351
369
|
|
|
352
370
|
<span class="summary_desc"><div class='inline'><p>Delegate include? to the records.</p>
|
|
@@ -358,7 +376,7 @@
|
|
|
358
376
|
<li class="public ">
|
|
359
377
|
<span class="summary_signature">
|
|
360
378
|
|
|
361
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (
|
|
379
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Object) <strong>initialize</strong>(*args) </a>
|
|
362
380
|
|
|
363
381
|
|
|
364
382
|
|
|
@@ -369,10 +387,10 @@
|
|
|
369
387
|
|
|
370
388
|
|
|
371
389
|
|
|
390
|
+
|
|
372
391
|
|
|
373
392
|
|
|
374
|
-
<span class="summary_desc"><div class='inline'
|
|
375
|
-
</div></span>
|
|
393
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
376
394
|
|
|
377
395
|
</li>
|
|
378
396
|
|
|
@@ -391,6 +409,7 @@
|
|
|
391
409
|
|
|
392
410
|
|
|
393
411
|
|
|
412
|
+
|
|
394
413
|
|
|
395
414
|
|
|
396
415
|
<span class="summary_desc"><div class='inline'><p>Delegate methods we don't find directly to the records array.</p>
|
|
@@ -415,6 +434,7 @@
|
|
|
415
434
|
|
|
416
435
|
|
|
417
436
|
|
|
437
|
+
|
|
418
438
|
|
|
419
439
|
|
|
420
440
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
@@ -436,6 +456,7 @@
|
|
|
436
456
|
|
|
437
457
|
|
|
438
458
|
|
|
459
|
+
|
|
439
460
|
|
|
440
461
|
|
|
441
462
|
<span class="summary_desc"><div class='inline'><p>Replace an association with object or array of objects.</p>
|
|
@@ -458,6 +479,7 @@
|
|
|
458
479
|
|
|
459
480
|
|
|
460
481
|
|
|
482
|
+
|
|
461
483
|
|
|
462
484
|
|
|
463
485
|
<span class="summary_desc"><div class='inline'><p>Naive association filtering.</p>
|
|
@@ -478,6 +500,7 @@
|
|
|
478
500
|
|
|
479
501
|
|
|
480
502
|
|
|
503
|
+
|
|
481
504
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Association.html" title="Dynamoid::Associations::Association (module)">Association</a></span></h3>
|
|
482
505
|
<p class="inherited"><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>
|
|
483
506
|
<div id="method_missing_details" class="method_details_list">
|
|
@@ -488,13 +511,15 @@
|
|
|
488
511
|
</p>
|
|
489
512
|
|
|
490
513
|
<div class="method_details first">
|
|
491
|
-
<
|
|
514
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
|
492
515
|
|
|
493
516
|
- (<tt>Object</tt>) <strong>method_missing</strong>(method, *args)
|
|
494
517
|
|
|
495
518
|
|
|
496
519
|
|
|
497
|
-
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
</h3><div class="docstring">
|
|
498
523
|
<div class="discussion">
|
|
499
524
|
<p>Delegate methods we don't find directly to the records array.</p>
|
|
500
525
|
|
|
@@ -503,7 +528,7 @@
|
|
|
503
528
|
</div>
|
|
504
529
|
<div class="tags">
|
|
505
530
|
|
|
506
|
-
<
|
|
531
|
+
<p class="tag_title">Since:</p>
|
|
507
532
|
<ul class="since">
|
|
508
533
|
|
|
509
534
|
<li>
|
|
@@ -555,15 +580,16 @@
|
|
|
555
580
|
|
|
556
581
|
|
|
557
582
|
<span id="query=-instance_method"></span>
|
|
558
|
-
<span id="query-instance_method"></span>
|
|
559
583
|
<div class="method_details first">
|
|
560
|
-
<
|
|
584
|
+
<h3 class="signature first" id="query-instance_method">
|
|
561
585
|
|
|
562
586
|
- (<tt>Object</tt>) <strong>query</strong>
|
|
563
587
|
|
|
564
588
|
|
|
565
589
|
|
|
566
|
-
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
</h3><div class="docstring">
|
|
567
593
|
<div class="discussion">
|
|
568
594
|
<p>Returns the value of attribute query</p>
|
|
569
595
|
|
|
@@ -599,16 +625,18 @@
|
|
|
599
625
|
|
|
600
626
|
<div id="instance_method_details" class="method_details_list">
|
|
601
627
|
<h2>Instance Method Details</h2>
|
|
602
|
-
|
|
628
|
+
|
|
603
629
|
|
|
604
630
|
<div class="method_details first">
|
|
605
|
-
<
|
|
631
|
+
<h3 class="signature first" id="<<-instance_method">
|
|
606
632
|
|
|
607
633
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong><<</strong>(object)
|
|
608
634
|
|
|
609
635
|
|
|
610
636
|
|
|
611
|
-
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
</h3><div class="docstring">
|
|
612
640
|
<div class="discussion">
|
|
613
641
|
<p>Add an object or array of objects to an association. This preserves the current records in the association (if any)
|
|
614
642
|
and adds the object to the target association if it is detected to exist.</p>
|
|
@@ -617,7 +645,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
617
645
|
</div>
|
|
618
646
|
</div>
|
|
619
647
|
<div class="tags">
|
|
620
|
-
<
|
|
648
|
+
<p class="tag_title">Parameters:</p>
|
|
621
649
|
<ul class="param">
|
|
622
650
|
|
|
623
651
|
<li>
|
|
@@ -637,7 +665,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
637
665
|
|
|
638
666
|
</ul>
|
|
639
667
|
|
|
640
|
-
<
|
|
668
|
+
<p class="tag_title">Returns:</p>
|
|
641
669
|
<ul class="return">
|
|
642
670
|
|
|
643
671
|
<li>
|
|
@@ -654,7 +682,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
654
682
|
</li>
|
|
655
683
|
|
|
656
684
|
</ul>
|
|
657
|
-
<
|
|
685
|
+
<p class="tag_title">Since:</p>
|
|
658
686
|
<ul class="since">
|
|
659
687
|
|
|
660
688
|
<li>
|
|
@@ -696,13 +724,15 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
696
724
|
</div>
|
|
697
725
|
|
|
698
726
|
<div class="method_details ">
|
|
699
|
-
<
|
|
727
|
+
<h3 class="signature " id="==-instance_method">
|
|
700
728
|
|
|
701
729
|
- (<tt>Boolean</tt>) <strong>==</strong>(other)
|
|
702
730
|
|
|
703
731
|
|
|
704
732
|
|
|
705
|
-
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
</h3><div class="docstring">
|
|
706
736
|
<div class="discussion">
|
|
707
737
|
<p>Is this array equal to the association's records?</p>
|
|
708
738
|
|
|
@@ -711,7 +741,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
711
741
|
</div>
|
|
712
742
|
<div class="tags">
|
|
713
743
|
|
|
714
|
-
<
|
|
744
|
+
<p class="tag_title">Returns:</p>
|
|
715
745
|
<ul class="return">
|
|
716
746
|
|
|
717
747
|
<li>
|
|
@@ -728,7 +758,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
728
758
|
</li>
|
|
729
759
|
|
|
730
760
|
</ul>
|
|
731
|
-
<
|
|
761
|
+
<p class="tag_title">Since:</p>
|
|
732
762
|
<ul class="since">
|
|
733
763
|
|
|
734
764
|
<li>
|
|
@@ -766,13 +796,15 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
766
796
|
</div>
|
|
767
797
|
|
|
768
798
|
<div class="method_details ">
|
|
769
|
-
<
|
|
799
|
+
<h3 class="signature " id="create-instance_method">
|
|
770
800
|
|
|
771
801
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>create</strong>(attributes = {})
|
|
772
802
|
|
|
773
803
|
|
|
774
804
|
|
|
775
|
-
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
</h3><div class="docstring">
|
|
776
808
|
<div class="discussion">
|
|
777
809
|
<p>Create a new instance of the target class and add it directly to the association.</p>
|
|
778
810
|
|
|
@@ -780,7 +812,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
780
812
|
</div>
|
|
781
813
|
</div>
|
|
782
814
|
<div class="tags">
|
|
783
|
-
<
|
|
815
|
+
<p class="tag_title">Parameters:</p>
|
|
784
816
|
<ul class="param">
|
|
785
817
|
|
|
786
818
|
<li>
|
|
@@ -800,7 +832,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
800
832
|
|
|
801
833
|
</ul>
|
|
802
834
|
|
|
803
|
-
<
|
|
835
|
+
<p class="tag_title">Returns:</p>
|
|
804
836
|
<ul class="return">
|
|
805
837
|
|
|
806
838
|
<li>
|
|
@@ -817,7 +849,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
817
849
|
</li>
|
|
818
850
|
|
|
819
851
|
</ul>
|
|
820
|
-
<
|
|
852
|
+
<p class="tag_title">Since:</p>
|
|
821
853
|
<ul class="since">
|
|
822
854
|
|
|
823
855
|
<li>
|
|
@@ -855,13 +887,15 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
855
887
|
</div>
|
|
856
888
|
|
|
857
889
|
<div class="method_details ">
|
|
858
|
-
<
|
|
890
|
+
<h3 class="signature " id="create!-instance_method">
|
|
859
891
|
|
|
860
892
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>create!</strong>(attributes = {})
|
|
861
893
|
|
|
862
894
|
|
|
863
895
|
|
|
864
|
-
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
</h3><div class="docstring">
|
|
865
899
|
<div class="discussion">
|
|
866
900
|
<p>Create a new instance of the target class and add it directly to the association. If the create fails an exception will be raised.</p>
|
|
867
901
|
|
|
@@ -869,7 +903,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
869
903
|
</div>
|
|
870
904
|
</div>
|
|
871
905
|
<div class="tags">
|
|
872
|
-
<
|
|
906
|
+
<p class="tag_title">Parameters:</p>
|
|
873
907
|
<ul class="param">
|
|
874
908
|
|
|
875
909
|
<li>
|
|
@@ -889,7 +923,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
889
923
|
|
|
890
924
|
</ul>
|
|
891
925
|
|
|
892
|
-
<
|
|
926
|
+
<p class="tag_title">Returns:</p>
|
|
893
927
|
<ul class="return">
|
|
894
928
|
|
|
895
929
|
<li>
|
|
@@ -906,7 +940,7 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
906
940
|
</li>
|
|
907
941
|
|
|
908
942
|
</ul>
|
|
909
|
-
<
|
|
943
|
+
<p class="tag_title">Since:</p>
|
|
910
944
|
<ul class="since">
|
|
911
945
|
|
|
912
946
|
<li>
|
|
@@ -944,13 +978,15 @@ and adds the object to the target association if it is detected to exist.</p>
|
|
|
944
978
|
</div>
|
|
945
979
|
|
|
946
980
|
<div class="method_details ">
|
|
947
|
-
<
|
|
981
|
+
<h3 class="signature " id="delete-instance_method">
|
|
948
982
|
|
|
949
983
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>delete</strong>(object)
|
|
950
984
|
|
|
951
985
|
|
|
952
986
|
|
|
953
|
-
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
</h3><div class="docstring">
|
|
954
990
|
<div class="discussion">
|
|
955
991
|
<p>Deletes an object or array of objects from the association. This removes their records from the association field on the source,
|
|
956
992
|
and attempts to remove the source from the target association if it is detected to exist.</p>
|
|
@@ -959,7 +995,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
959
995
|
</div>
|
|
960
996
|
</div>
|
|
961
997
|
<div class="tags">
|
|
962
|
-
<
|
|
998
|
+
<p class="tag_title">Parameters:</p>
|
|
963
999
|
<ul class="param">
|
|
964
1000
|
|
|
965
1001
|
<li>
|
|
@@ -979,7 +1015,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
979
1015
|
|
|
980
1016
|
</ul>
|
|
981
1017
|
|
|
982
|
-
<
|
|
1018
|
+
<p class="tag_title">Returns:</p>
|
|
983
1019
|
<ul class="return">
|
|
984
1020
|
|
|
985
1021
|
<li>
|
|
@@ -996,7 +1032,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
996
1032
|
</li>
|
|
997
1033
|
|
|
998
1034
|
</ul>
|
|
999
|
-
<
|
|
1035
|
+
<p class="tag_title">Since:</p>
|
|
1000
1036
|
<ul class="since">
|
|
1001
1037
|
|
|
1002
1038
|
<li>
|
|
@@ -1038,13 +1074,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1038
1074
|
</div>
|
|
1039
1075
|
|
|
1040
1076
|
<div class="method_details ">
|
|
1041
|
-
<
|
|
1077
|
+
<h3 class="signature " id="delete_all-instance_method">
|
|
1042
1078
|
|
|
1043
1079
|
- (<tt>Object</tt>) <strong>delete_all</strong>
|
|
1044
1080
|
|
|
1045
1081
|
|
|
1046
1082
|
|
|
1047
|
-
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
</h3><div class="docstring">
|
|
1048
1086
|
<div class="discussion">
|
|
1049
1087
|
<p>Deletes all members of the association and removes them from the association.</p>
|
|
1050
1088
|
|
|
@@ -1053,7 +1091,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1053
1091
|
</div>
|
|
1054
1092
|
<div class="tags">
|
|
1055
1093
|
|
|
1056
|
-
<
|
|
1094
|
+
<p class="tag_title">Since:</p>
|
|
1057
1095
|
<ul class="since">
|
|
1058
1096
|
|
|
1059
1097
|
<li>
|
|
@@ -1095,13 +1133,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1095
1133
|
</div>
|
|
1096
1134
|
|
|
1097
1135
|
<div class="method_details ">
|
|
1098
|
-
<
|
|
1136
|
+
<h3 class="signature " id="destroy_all-instance_method">
|
|
1099
1137
|
|
|
1100
1138
|
- (<tt>Object</tt>) <strong>destroy_all</strong>
|
|
1101
1139
|
|
|
1102
1140
|
|
|
1103
1141
|
|
|
1104
|
-
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
</h3><div class="docstring">
|
|
1105
1145
|
<div class="discussion">
|
|
1106
1146
|
<p>Destroys all members of the association and removes them from the association.</p>
|
|
1107
1147
|
|
|
@@ -1110,7 +1150,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1110
1150
|
</div>
|
|
1111
1151
|
<div class="tags">
|
|
1112
1152
|
|
|
1113
|
-
<
|
|
1153
|
+
<p class="tag_title">Since:</p>
|
|
1114
1154
|
<ul class="since">
|
|
1115
1155
|
|
|
1116
1156
|
<li>
|
|
@@ -1152,13 +1192,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1152
1192
|
</div>
|
|
1153
1193
|
|
|
1154
1194
|
<div class="method_details ">
|
|
1155
|
-
<
|
|
1195
|
+
<h3 class="signature " id="each-instance_method">
|
|
1156
1196
|
|
|
1157
1197
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>each</strong>(&block)
|
|
1158
1198
|
|
|
1159
1199
|
|
|
1160
1200
|
|
|
1161
|
-
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
</h3><div class="docstring">
|
|
1162
1204
|
<div class="discussion">
|
|
1163
1205
|
<p>Create a new instance of the target class and add it directly to the association. If the create fails an exception will be raised.</p>
|
|
1164
1206
|
|
|
@@ -1166,7 +1208,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1166
1208
|
</div>
|
|
1167
1209
|
</div>
|
|
1168
1210
|
<div class="tags">
|
|
1169
|
-
<
|
|
1211
|
+
<p class="tag_title">Parameters:</p>
|
|
1170
1212
|
<ul class="param">
|
|
1171
1213
|
|
|
1172
1214
|
<li>
|
|
@@ -1186,7 +1228,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1186
1228
|
|
|
1187
1229
|
</ul>
|
|
1188
1230
|
|
|
1189
|
-
<
|
|
1231
|
+
<p class="tag_title">Returns:</p>
|
|
1190
1232
|
<ul class="return">
|
|
1191
1233
|
|
|
1192
1234
|
<li>
|
|
@@ -1203,7 +1245,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1203
1245
|
</li>
|
|
1204
1246
|
|
|
1205
1247
|
</ul>
|
|
1206
|
-
<
|
|
1248
|
+
<p class="tag_title">Since:</p>
|
|
1207
1249
|
<ul class="since">
|
|
1208
1250
|
|
|
1209
1251
|
<li>
|
|
@@ -1241,13 +1283,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1241
1283
|
</div>
|
|
1242
1284
|
|
|
1243
1285
|
<div class="method_details ">
|
|
1244
|
-
<
|
|
1286
|
+
<h3 class="signature " id="find_target-instance_method">
|
|
1245
1287
|
|
|
1246
1288
|
- (<tt>Object</tt>) <strong>find_target</strong>
|
|
1247
1289
|
|
|
1248
1290
|
|
|
1249
1291
|
|
|
1250
|
-
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
</h3><div class="docstring">
|
|
1251
1295
|
<div class="discussion">
|
|
1252
1296
|
<p>The records associated to the source.</p>
|
|
1253
1297
|
|
|
@@ -1256,7 +1300,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1256
1300
|
</div>
|
|
1257
1301
|
<div class="tags">
|
|
1258
1302
|
|
|
1259
|
-
<
|
|
1303
|
+
<p class="tag_title">Returns:</p>
|
|
1260
1304
|
<ul class="return">
|
|
1261
1305
|
|
|
1262
1306
|
<li>
|
|
@@ -1273,7 +1317,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1273
1317
|
</li>
|
|
1274
1318
|
|
|
1275
1319
|
</ul>
|
|
1276
|
-
<
|
|
1320
|
+
<p class="tag_title">Since:</p>
|
|
1277
1321
|
<ul class="since">
|
|
1278
1322
|
|
|
1279
1323
|
<li>
|
|
@@ -1311,13 +1355,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1311
1355
|
</div>
|
|
1312
1356
|
|
|
1313
1357
|
<div class="method_details ">
|
|
1314
|
-
<
|
|
1358
|
+
<h3 class="signature " id="include?-instance_method">
|
|
1315
1359
|
|
|
1316
1360
|
- (<tt>Boolean</tt>) <strong>include?</strong>(object)
|
|
1317
1361
|
|
|
1318
1362
|
|
|
1319
1363
|
|
|
1320
|
-
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
</h3><div class="docstring">
|
|
1321
1367
|
<div class="discussion">
|
|
1322
1368
|
<p>Delegate include? to the records.</p>
|
|
1323
1369
|
|
|
@@ -1326,7 +1372,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1326
1372
|
</div>
|
|
1327
1373
|
<div class="tags">
|
|
1328
1374
|
|
|
1329
|
-
<
|
|
1375
|
+
<p class="tag_title">Returns:</p>
|
|
1330
1376
|
<ul class="return">
|
|
1331
1377
|
|
|
1332
1378
|
<li>
|
|
@@ -1362,23 +1408,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1362
1408
|
</div>
|
|
1363
1409
|
|
|
1364
1410
|
<div class="method_details ">
|
|
1365
|
-
<
|
|
1411
|
+
<h3 class="signature " id="initialize-instance_method">
|
|
1366
1412
|
|
|
1367
|
-
- (<tt
|
|
1413
|
+
- (<tt>Object</tt>) <strong>initialize</strong>(*args)
|
|
1368
1414
|
|
|
1369
1415
|
|
|
1370
1416
|
|
|
1371
|
-
</p><div class="docstring">
|
|
1372
|
-
<div class="discussion">
|
|
1373
|
-
<p>A new instance of ManyAssociation</p>
|
|
1374
1417
|
|
|
1375
|
-
|
|
1376
|
-
</div>
|
|
1377
|
-
</div>
|
|
1378
|
-
<div class="tags">
|
|
1379
1418
|
|
|
1380
|
-
|
|
1381
|
-
</div><table class="source_code">
|
|
1419
|
+
</h3><table class="source_code">
|
|
1382
1420
|
<tr>
|
|
1383
1421
|
<td>
|
|
1384
1422
|
<pre class="lines">
|
|
@@ -1402,7 +1440,7 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1402
1440
|
</div>
|
|
1403
1441
|
|
|
1404
1442
|
<div class="method_details ">
|
|
1405
|
-
<
|
|
1443
|
+
<h3 class="signature " id="records-instance_method">
|
|
1406
1444
|
|
|
1407
1445
|
- (<tt>Object</tt>) <strong>records</strong>
|
|
1408
1446
|
|
|
@@ -1412,7 +1450,9 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1412
1450
|
<span class="names"><span id='all-instance_method'>all</span></span>
|
|
1413
1451
|
</span>
|
|
1414
1452
|
|
|
1415
|
-
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
</h3><table class="source_code">
|
|
1416
1456
|
<tr>
|
|
1417
1457
|
<td>
|
|
1418
1458
|
<pre class="lines">
|
|
@@ -1442,13 +1482,15 @@ and attempts to remove the source from the target association if it is detected
|
|
|
1442
1482
|
</div>
|
|
1443
1483
|
|
|
1444
1484
|
<div class="method_details ">
|
|
1445
|
-
<
|
|
1485
|
+
<h3 class="signature " id="setter-instance_method">
|
|
1446
1486
|
|
|
1447
1487
|
- (<tt><span class='object_link'><a href="../Document.html" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>setter</strong>(object)
|
|
1448
1488
|
|
|
1449
1489
|
|
|
1450
1490
|
|
|
1451
|
-
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
</h3><div class="docstring">
|
|
1452
1494
|
<div class="discussion">
|
|
1453
1495
|
<p>Replace an association with object or array of objects. This removes all of the existing associated records and replaces them with
|
|
1454
1496
|
the passed object(s), and associates the target association if it is detected to exist.</p>
|
|
@@ -1457,7 +1499,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1457
1499
|
</div>
|
|
1458
1500
|
</div>
|
|
1459
1501
|
<div class="tags">
|
|
1460
|
-
<
|
|
1502
|
+
<p class="tag_title">Parameters:</p>
|
|
1461
1503
|
<ul class="param">
|
|
1462
1504
|
|
|
1463
1505
|
<li>
|
|
@@ -1477,7 +1519,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1477
1519
|
|
|
1478
1520
|
</ul>
|
|
1479
1521
|
|
|
1480
|
-
<
|
|
1522
|
+
<p class="tag_title">Returns:</p>
|
|
1481
1523
|
<ul class="return">
|
|
1482
1524
|
|
|
1483
1525
|
<li>
|
|
@@ -1494,7 +1536,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1494
1536
|
</li>
|
|
1495
1537
|
|
|
1496
1538
|
</ul>
|
|
1497
|
-
<
|
|
1539
|
+
<p class="tag_title">Since:</p>
|
|
1498
1540
|
<ul class="since">
|
|
1499
1541
|
|
|
1500
1542
|
<li>
|
|
@@ -1536,13 +1578,15 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1536
1578
|
</div>
|
|
1537
1579
|
|
|
1538
1580
|
<div class="method_details ">
|
|
1539
|
-
<
|
|
1581
|
+
<h3 class="signature " id="where-instance_method">
|
|
1540
1582
|
|
|
1541
1583
|
- (<tt>Dynamoid::Association</tt>) <strong>where</strong>(args)
|
|
1542
1584
|
|
|
1543
1585
|
|
|
1544
1586
|
|
|
1545
|
-
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
</h3><div class="docstring">
|
|
1546
1590
|
<div class="discussion">
|
|
1547
1591
|
<p>Naive association filtering.</p>
|
|
1548
1592
|
|
|
@@ -1550,7 +1594,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1550
1594
|
</div>
|
|
1551
1595
|
</div>
|
|
1552
1596
|
<div class="tags">
|
|
1553
|
-
<
|
|
1597
|
+
<p class="tag_title">Parameters:</p>
|
|
1554
1598
|
<ul class="param">
|
|
1555
1599
|
|
|
1556
1600
|
<li>
|
|
@@ -1570,7 +1614,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1570
1614
|
|
|
1571
1615
|
</ul>
|
|
1572
1616
|
|
|
1573
|
-
<
|
|
1617
|
+
<p class="tag_title">Returns:</p>
|
|
1574
1618
|
<ul class="return">
|
|
1575
1619
|
|
|
1576
1620
|
<li>
|
|
@@ -1587,7 +1631,7 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1587
1631
|
</li>
|
|
1588
1632
|
|
|
1589
1633
|
</ul>
|
|
1590
|
-
<
|
|
1634
|
+
<p class="tag_title">Since:</p>
|
|
1591
1635
|
<ul class="since">
|
|
1592
1636
|
|
|
1593
1637
|
<li>
|
|
@@ -1629,11 +1673,11 @@ the passed object(s), and associates the target association if it is detected to
|
|
|
1629
1673
|
</div>
|
|
1630
1674
|
|
|
1631
1675
|
</div>
|
|
1632
|
-
|
|
1676
|
+
|
|
1633
1677
|
<div id="footer">
|
|
1634
|
-
Generated on Thu
|
|
1678
|
+
Generated on Thu Jun 27 21:59:13 2013 by
|
|
1635
1679
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1636
|
-
0.
|
|
1680
|
+
0.8.6.1 (ruby-1.9.3).
|
|
1637
1681
|
</div>
|
|
1638
1682
|
|
|
1639
1683
|
</body>
|