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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/VERSION +1 -1
  5. data/compony.gemspec +3 -3
  6. data/doc/ComponentGenerator.html +1 -1
  7. data/doc/Components.html +1 -1
  8. data/doc/ComponentsGenerator.html +1 -1
  9. data/doc/Compony/Component.html +1 -1
  10. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  11. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default.html +1 -1
  16. data/doc/Compony/ComponentMixins/Resourceful.html +25 -94
  17. data/doc/Compony/ComponentMixins.html +1 -1
  18. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  19. data/doc/Compony/Components/Buttons/Link.html +1 -1
  20. data/doc/Compony/Components/Buttons.html +1 -1
  21. data/doc/Compony/Components/Destroy.html +2 -2
  22. data/doc/Compony/Components/Edit.html +2 -2
  23. data/doc/Compony/Components/Form.html +1 -1
  24. data/doc/Compony/Components/Index.html +2 -2
  25. data/doc/Compony/Components/List.html +2 -2
  26. data/doc/Compony/Components/New.html +2 -2
  27. data/doc/Compony/Components/Show.html +47 -22
  28. data/doc/Compony/Components/WithForm.html +1 -1
  29. data/doc/Compony/Components.html +1 -1
  30. data/doc/Compony/ControllerMixin.html +1 -1
  31. data/doc/Compony/Engine.html +1 -1
  32. data/doc/Compony/Intent.html +75 -63
  33. data/doc/Compony/ManageIntentsDsl.html +16 -12
  34. data/doc/Compony/MethodAccessibleHash.html +1 -1
  35. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  36. data/doc/Compony/ModelFields/Association.html +1 -1
  37. data/doc/Compony/ModelFields/Attachment.html +1 -1
  38. data/doc/Compony/ModelFields/Base.html +1 -1
  39. data/doc/Compony/ModelFields/Boolean.html +1 -1
  40. data/doc/Compony/ModelFields/Color.html +1 -1
  41. data/doc/Compony/ModelFields/Currency.html +1 -1
  42. data/doc/Compony/ModelFields/Date.html +1 -1
  43. data/doc/Compony/ModelFields/Datetime.html +1 -1
  44. data/doc/Compony/ModelFields/Decimal.html +1 -1
  45. data/doc/Compony/ModelFields/Email.html +1 -1
  46. data/doc/Compony/ModelFields/Float.html +1 -1
  47. data/doc/Compony/ModelFields/Integer.html +1 -1
  48. data/doc/Compony/ModelFields/Percentage.html +1 -1
  49. data/doc/Compony/ModelFields/Phone.html +1 -1
  50. data/doc/Compony/ModelFields/RichText.html +1 -1
  51. data/doc/Compony/ModelFields/String.html +1 -1
  52. data/doc/Compony/ModelFields/Text.html +1 -1
  53. data/doc/Compony/ModelFields/Time.html +1 -1
  54. data/doc/Compony/ModelFields/Url.html +1 -1
  55. data/doc/Compony/ModelFields.html +1 -1
  56. data/doc/Compony/ModelMixin.html +1 -1
  57. data/doc/Compony/NaturalOrdering.html +1 -1
  58. data/doc/Compony/RequestContext.html +1 -1
  59. data/doc/Compony/Version.html +1 -1
  60. data/doc/Compony/ViewHelpers.html +1 -1
  61. data/doc/Compony/VirtualModel.html +1 -1
  62. data/doc/Compony.html +1 -1
  63. data/doc/ComponyController.html +1 -1
  64. data/doc/_index.html +1 -1
  65. data/doc/file.README.html +1 -1
  66. data/doc/guide/resourceful.md +1 -11
  67. data/doc/index.html +1 -1
  68. data/doc/method_list.html +66 -74
  69. data/doc/top-level-namespace.html +1 -1
  70. data/lib/compony/component_mixins/resourceful.rb +0 -7
  71. data/lib/compony/components/index.rb +1 -1
  72. data/lib/compony/components/show.rb +3 -1
  73. data/lib/compony/intent.rb +8 -2
  74. data/lib/compony/manage_intents_dsl.rb +6 -4
  75. metadata +2 -2
@@ -289,7 +289,7 @@
289
289
  </div>
290
290
 
291
291
  <div id="footer">
292
- Generated on Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:03 2025 by
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>
@@ -519,7 +519,7 @@
519
519
  </div>
520
520
 
521
521
  <div id="footer">
522
- Generated on Mon Dec 8 17:21:03 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:04 2025 by
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>
@@ -129,7 +129,7 @@
129
129
  </div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Mon Dec 8 17:21:03 2025 by
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 Mon Dec 8 17:21:03 2025 by
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 Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:03 2025 by
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>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Mon Dec 8 17:21:04 2025 by
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 Mon Dec 8 17:21:03 2025 by
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 Mon Dec 8 17:21:03 2025 by
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>
@@ -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
- As mentioned earlier, hooks such as those provided by Resourceful typically run only when a component is accessed standalone. This means that in a nested setting, only the component running those hooks is the root component.
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 Mon Dec 8 17:21:03 2025 by
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>