compony 0.10.1 → 0.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/compony.gemspec +3 -3
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +25 -94
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Buttons/CssButton.html +1 -1
- data/doc/Compony/Components/Buttons/Link.html +1 -1
- data/doc/Compony/Components/Buttons.html +1 -1
- data/doc/Compony/Components/Destroy.html +2 -2
- data/doc/Compony/Components/Edit.html +2 -2
- data/doc/Compony/Components/Form.html +1 -1
- data/doc/Compony/Components/Index.html +2 -2
- data/doc/Compony/Components/List.html +2 -2
- data/doc/Compony/Components/New.html +2 -2
- data/doc/Compony/Components/Show.html +47 -22
- data/doc/Compony/Components/WithForm.html +1 -1
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/Intent.html +75 -63
- data/doc/Compony/ManageIntentsDsl.html +16 -12
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +1 -1
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +1 -1
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +1 -1
- data/doc/Compony/VirtualModel.html +1 -1
- data/doc/Compony.html +1 -1
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/guide/resourceful.md +1 -11
- data/doc/index.html +1 -1
- data/doc/method_list.html +66 -74
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component_mixins/resourceful.rb +0 -7
- data/lib/compony/components/index.rb +1 -1
- data/lib/compony/components/show.rb +3 -1
- data/lib/compony/intent.rb +8 -2
- data/lib/compony/manage_intents_dsl.rb +6 -4
- metadata +2 -2
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
</div>
|
|
290
290
|
|
|
291
291
|
<div id="footer">
|
|
292
|
-
Generated on
|
|
292
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
293
293
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
294
294
|
0.9.34 (ruby-3.3.5).
|
|
295
295
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on
|
|
233
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
234
234
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.9.34 (ruby-3.3.5).
|
|
236
236
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
</div>
|
|
292
292
|
|
|
293
293
|
<div id="footer">
|
|
294
|
-
Generated on
|
|
294
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
295
295
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
296
296
|
0.9.34 (ruby-3.3.5).
|
|
297
297
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
|
|
146
146
|
<div id="footer">
|
|
147
|
-
Generated on
|
|
147
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
148
148
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
149
149
|
0.9.34 (ruby-3.3.5).
|
|
150
150
|
</div>
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</div>
|
|
231
231
|
|
|
232
232
|
<div id="footer">
|
|
233
|
-
Generated on
|
|
233
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
234
234
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
235
235
|
0.9.34 (ruby-3.3.5).
|
|
236
236
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on
|
|
119
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.9.34 (ruby-3.3.5).
|
|
122
122
|
</div>
|
data/doc/Compony/ModelMixin.html
CHANGED
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
</div>
|
|
520
520
|
|
|
521
521
|
<div id="footer">
|
|
522
|
-
Generated on
|
|
522
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
523
523
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
524
524
|
0.9.34 (ruby-3.3.5).
|
|
525
525
|
</div>
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
</div>
|
|
291
291
|
|
|
292
292
|
<div id="footer">
|
|
293
|
-
Generated on
|
|
293
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
294
294
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
295
295
|
0.9.34 (ruby-3.3.5).
|
|
296
296
|
</div>
|
|
@@ -1084,7 +1084,7 @@
|
|
|
1084
1084
|
</div>
|
|
1085
1085
|
|
|
1086
1086
|
<div id="footer">
|
|
1087
|
-
Generated on
|
|
1087
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
1088
1088
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1089
1089
|
0.9.34 (ruby-3.3.5).
|
|
1090
1090
|
</div>
|
data/doc/Compony/Version.html
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
</div>
|
|
130
130
|
|
|
131
131
|
<div id="footer">
|
|
132
|
-
Generated on
|
|
132
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
133
133
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
134
134
|
0.9.34 (ruby-3.3.5).
|
|
135
135
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
</div>
|
|
223
223
|
|
|
224
224
|
<div id="footer">
|
|
225
|
-
Generated on
|
|
225
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
226
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
227
227
|
0.9.34 (ruby-3.3.5).
|
|
228
228
|
</div>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
</div>
|
|
143
143
|
|
|
144
144
|
<div id="footer">
|
|
145
|
-
Generated on
|
|
145
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
146
146
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
147
147
|
0.9.34 (ruby-3.3.5).
|
|
148
148
|
</div>
|
data/doc/Compony.html
CHANGED
|
@@ -1674,7 +1674,7 @@
|
|
|
1674
1674
|
</div>
|
|
1675
1675
|
|
|
1676
1676
|
<div id="footer">
|
|
1677
|
-
Generated on
|
|
1677
|
+
Generated on Fri Dec 12 16:04:22 2025 by
|
|
1678
1678
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1679
1679
|
0.9.34 (ruby-3.3.5).
|
|
1680
1680
|
</div>
|
data/doc/ComponyController.html
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Fri Dec 12 16:04:23 2025 by
|
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
119
|
0.9.34 (ruby-3.3.5).
|
|
120
120
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
</div>
|
|
623
623
|
|
|
624
624
|
<div id="footer">
|
|
625
|
-
Generated on
|
|
625
|
+
Generated on Fri Dec 12 16:04:21 2025 by
|
|
626
626
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
627
627
|
0.9.34 (ruby-3.3.5).
|
|
628
628
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
</div></div>
|
|
200
200
|
|
|
201
201
|
<div id="footer">
|
|
202
|
-
Generated on
|
|
202
|
+
Generated on Fri Dec 12 16:04:21 2025 by
|
|
203
203
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
204
204
|
0.9.34 (ruby-3.3.5).
|
|
205
205
|
</div>
|
data/doc/guide/resourceful.md
CHANGED
|
@@ -88,16 +88,6 @@ This graph documents a typical resourceful lifecycle according to which Compony'
|
|
|
88
88
|
|
|
89
89
|
## Nesting resourceful components
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
When nesting resourceful components, it is therefore best to load all necessary data in the root component. Make sure to include any relations used by sub-components in order to avoid "n+1" queries in the database.
|
|
94
|
-
|
|
95
|
-
`resourceful_sub_comp` is the resourceful sibling of `sub_comp` and both are used the same way. Under the hood, the resourceful call passes two extra parameters to the sub component: `data` and `data_class`.
|
|
96
|
-
|
|
97
|
-
The rule of thumb thus becomes:
|
|
98
|
-
|
|
99
|
-
- When a resourceful component instantiates a resourceful sub-component, use `resourceful_sub_comp` in the parent component.
|
|
100
|
-
- When a resourceful component instantiates a non-resourceful sub-component, use `sub_comp`.
|
|
101
|
-
- The situation where a non-resourceful component instantiates a resourceful component should not occur. Instead, make your parent component resourceful, even if it doesn't use the data itself. By housing a resourceful sub-comp, the parent component's nature inherently becomes resourceful and you should use the Resourceful mixin.
|
|
91
|
+
The [Intent](/doc/guide/intents.md) API makes it very easy to pass a resource to nested components. For more details, refer to [this example](/doc/guide/nesting.md#rendering-list-as-sub-comp-in-show).
|
|
102
92
|
|
|
103
93
|
[Guide index](/README.md#guide--documentation)
|
data/doc/index.html
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
</div></div>
|
|
200
200
|
|
|
201
201
|
<div id="footer">
|
|
202
|
-
Generated on
|
|
202
|
+
Generated on Fri Dec 12 16:04:21 2025 by
|
|
203
203
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
204
204
|
0.9.34 (ruby-3.3.5).
|
|
205
205
|
</div>
|