compony 0.11.8 → 0.11.9

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +36 -1
  3. data/CHANGELOG.md +31 -0
  4. data/CLAUDE.md +85 -0
  5. data/Gemfile.lock +1 -1
  6. data/README.md +13 -3
  7. data/VERSION +1 -1
  8. data/compony.gemspec +3 -3
  9. data/doc/ComponentGenerator.html +1 -1
  10. data/doc/Components.html +1 -1
  11. data/doc/ComponentsGenerator.html +1 -1
  12. data/doc/Compony/Component.html +54 -54
  13. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +109 -70
  16. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +64 -28
  17. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  18. data/doc/Compony/ComponentMixins/Default.html +1 -1
  19. data/doc/Compony/ComponentMixins/Resourceful.html +213 -74
  20. data/doc/Compony/ComponentMixins.html +1 -1
  21. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  22. data/doc/Compony/Components/Buttons/Link.html +1 -1
  23. data/doc/Compony/Components/Buttons.html +1 -1
  24. data/doc/Compony/Components/Destroy.html +83 -29
  25. data/doc/Compony/Components/Edit.html +110 -38
  26. data/doc/Compony/Components/Form.html +551 -208
  27. data/doc/Compony/Components/Index.html +1 -1
  28. data/doc/Compony/Components/List.html +3 -3
  29. data/doc/Compony/Components/New.html +110 -38
  30. data/doc/Compony/Components/Show.html +1 -1
  31. data/doc/Compony/Components/WithForm.html +194 -47
  32. data/doc/Compony/Components.html +1 -1
  33. data/doc/Compony/ControllerMixin.html +1 -1
  34. data/doc/Compony/Engine.html +1 -1
  35. data/doc/Compony/Intent.html +2 -2
  36. data/doc/Compony/ManageIntentsDsl.html +1 -1
  37. data/doc/Compony/MethodAccessibleHash.html +1 -1
  38. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  39. data/doc/Compony/ModelFields/Association.html +1 -1
  40. data/doc/Compony/ModelFields/Attachment.html +1 -1
  41. data/doc/Compony/ModelFields/Base.html +1 -1
  42. data/doc/Compony/ModelFields/Boolean.html +1 -1
  43. data/doc/Compony/ModelFields/Color.html +1 -1
  44. data/doc/Compony/ModelFields/Currency.html +1 -1
  45. data/doc/Compony/ModelFields/Date.html +1 -1
  46. data/doc/Compony/ModelFields/Datetime.html +1 -1
  47. data/doc/Compony/ModelFields/Decimal.html +1 -1
  48. data/doc/Compony/ModelFields/Email.html +1 -1
  49. data/doc/Compony/ModelFields/Float.html +1 -1
  50. data/doc/Compony/ModelFields/Integer.html +1 -1
  51. data/doc/Compony/ModelFields/Percentage.html +1 -1
  52. data/doc/Compony/ModelFields/Phone.html +1 -1
  53. data/doc/Compony/ModelFields/RichText.html +1 -1
  54. data/doc/Compony/ModelFields/String.html +1 -1
  55. data/doc/Compony/ModelFields/Text.html +1 -1
  56. data/doc/Compony/ModelFields/Time.html +1 -1
  57. data/doc/Compony/ModelFields/Url.html +1 -1
  58. data/doc/Compony/ModelFields.html +1 -1
  59. data/doc/Compony/ModelMixin.html +1 -1
  60. data/doc/Compony/NaturalOrdering.html +1 -1
  61. data/doc/Compony/RequestContext.html +1 -1
  62. data/doc/Compony/Version.html +1 -1
  63. data/doc/Compony/ViewHelpers.html +1 -1
  64. data/doc/Compony/VirtualModel.html +1 -1
  65. data/doc/Compony.html +1 -1
  66. data/doc/ComponyController.html +1 -1
  67. data/doc/_index.html +97 -1
  68. data/doc/file.CHANGELOG.html +758 -0
  69. data/doc/file.README.html +25 -4
  70. data/doc/file.basic_component.html +314 -0
  71. data/doc/file.cookbook.html +189 -0
  72. data/doc/file.destroy.html +105 -0
  73. data/doc/file.dsl_reference.html +672 -0
  74. data/doc/file.edit.html +109 -0
  75. data/doc/file.example.html +291 -0
  76. data/doc/file.example_advanced.html +257 -0
  77. data/doc/file.feasibility.html +115 -0
  78. data/doc/file.form.html +195 -0
  79. data/doc/file.generators.html +89 -0
  80. data/doc/file.glossary.html +217 -0
  81. data/doc/file.gotchas.html +222 -0
  82. data/doc/file.index.html +135 -0
  83. data/doc/file.inheritance.html +136 -0
  84. data/doc/file.installation.html +115 -0
  85. data/doc/file.integrations.html +218 -0
  86. data/doc/file.intents.html +265 -0
  87. data/doc/file.internal_datastructures.html +129 -0
  88. data/doc/file.list.html +253 -0
  89. data/doc/file.maintaining.html +127 -0
  90. data/doc/file.model_fields.html +137 -0
  91. data/doc/file.nesting.html +237 -0
  92. data/doc/file.new.html +109 -0
  93. data/doc/file.ownership.html +98 -0
  94. data/doc/file.patterns.html +669 -0
  95. data/doc/file.pre_built_components.html +99 -0
  96. data/doc/file.resourceful.html +181 -0
  97. data/doc/file.show.html +158 -0
  98. data/doc/file.standalone.html +233 -0
  99. data/doc/file.virtual_models.html +117 -0
  100. data/doc/file.with_form.html +157 -0
  101. data/doc/file_list.html +160 -0
  102. data/doc/guide/cookbook.md +41 -0
  103. data/doc/guide/dsl_reference.md +155 -0
  104. data/doc/guide/example_advanced.md +209 -0
  105. data/doc/guide/generators.md +1 -1
  106. data/doc/guide/glossary.md +42 -0
  107. data/doc/guide/gotchas.md +125 -0
  108. data/doc/guide/maintaining.md +64 -0
  109. data/doc/guide/patterns.md +681 -0
  110. data/doc/guide/pre_built_components/edit.md +1 -1
  111. data/doc/guide/pre_built_components/index.md +64 -1
  112. data/doc/guide/pre_built_components/list.md +111 -7
  113. data/doc/guide/pre_built_components/show.md +57 -2
  114. data/doc/guide/pre_built_components/with_form.md +56 -9
  115. data/doc/guide/pre_built_components.md +7 -2
  116. data/doc/guide/standalone.md +16 -1
  117. data/doc/index.html +25 -4
  118. data/doc/integrations.md +61 -0
  119. data/doc/llms.txt +62 -0
  120. data/doc/top-level-namespace.html +1 -1
  121. data/lib/compony/component.rb +8 -3
  122. data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +32 -15
  123. data/lib/compony/component_mixins/default/standalone/verb_dsl.rb +11 -3
  124. data/lib/compony/component_mixins/resourceful.rb +30 -16
  125. data/lib/compony/components/destroy.rb +21 -1
  126. data/lib/compony/components/edit.rb +25 -1
  127. data/lib/compony/components/form.rb +63 -21
  128. data/lib/compony/components/list.rb +1 -1
  129. data/lib/compony/components/new.rb +25 -1
  130. data/lib/compony/components/with_form.rb +20 -5
  131. data/lib/compony/intent.rb +1 -1
  132. metadata +43 -1
@@ -0,0 +1,758 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: CHANGELOG
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "CHANGELOG";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="file_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: CHANGELOG</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <div id="content"><div id='filecontents'>
61
+ <h1 id="label-0.11.9">0.11.9</h1>
62
+ <ul><li>
63
+ <p>Fix <code>standalone</code> overrides clobbering inherited <code>layout</code> / <code>skip_authentication</code> / <code>skip_forgery_protection</code>. A second <code>standalone</code> call (e.g. a subclass overriding a pre-built component) re-ran <code>StandaloneDsl</code> whose <code>to_conf</code> always emitted the hard defaults (<code>layout: true</code>, <code>skip_*: false</code>); <code>deep_merge!</code> then overwrote the value inherited from the parent. These now default to <code>nil</code> and the real defaults are only injected when <code>provide_defaults</code> is true (first call), so <code>compact</code> strips them on overrides and <code>deep_merge!</code> preserves the inherited value — mirroring <code>VerbDsl#to_conf</code>. Subclasses no longer need to repeat <code>layout :backend</code> just to keep it.</p>
64
+ </li><li>
65
+ <p>Enhance documentation for better LLM support (and humans as well of course):</p>
66
+ </li><li>
67
+ <p>Documentation: add agent-oriented docs — <code>CLAUDE.md</code> primer, <code>doc/llms.txt</code> index, <code>doc/guide/dsl_reference.md</code>, <code>doc/guide/glossary.md</code>, <code>doc/guide/gotchas.md</code>, <code>doc/guide/example_advanced.md</code>, <code>doc/guide/patterns.md</code>, <code>doc/guide/cookbook.md</code> (task-indexed recipes). Thicken the thin pre-built component docs (Index, Show, List, WithForm). Fix stale docs: README guide index links (Virtual models, Edit), <code>pre_built_components.md</code> (wrongly claimed no Show/Index component; Edit link), and an <code>Edit</code> hook name in <code>edit.md</code> (<code>on_update_failed</code>).</p>
68
+ </li><li>
69
+ <p>Inline YARD: documented previously-bare DSL hooks (New/Edit/Destroy <code>on_*</code>) and added <code>@param</code>/<code>@return</code>/<code>@yield</code>/<code>@api</code> plus <code>@!group DSL</code> to the WithForm, Form, Resourceful, verb and standalone DSL methods. Comments only — no behavior change.</p>
70
+ </li><li>
71
+ <p><code>.yardopts</code> now lists the guide pages as extra files so the whole guide (including the new agent docs) renders in the YARD/rubydoc reference, not just <code>lib/</code>.</p>
72
+ </li><li>
73
+ <p>Add <code>doc/integrations.md</code> (companion-gem map mirroring the gemspec) and <code>doc/guide/maintaining.md</code> (release / docs / dependency / anonymization policy); cross-link non-obvious DSL methods (e.g. <code>path</code>) to matching patterns.</p>
74
+ </li><li>
75
+ <p>Fix broken relative links: <code>generators.md</code> → <code>inheritance.md#best-practice</code> (was a doubled <code>./doc/guide/</code> path) and two wrong-depth links in <code>pre_built_components.md</code> (<code>../</code> → <code>./</code>). Full guide link/anchor set now verified (0 broken).</p>
76
+ </li><li>
77
+ <p>(Run <code>yard doc</code> to regenerate the HTML under <code>doc/</code> after doc changes.)</p>
78
+ </li></ul>
79
+
80
+ <h1 id="label-0.11.8">0.11.8</h1>
81
+ <ul><li>
82
+ <p>Fix <code>Compony::VirtualModel#attributes</code> to include virtual attributes (declared via <code>attribute :foo, :type</code>). The <code>include ActiveModel::Attributes</code> was shadowing <code>ActiveType::VirtualAttributes#attributes</code>, so virtual attribute values were stored in <code>@virtual_attributes</code> but invisible to <code>#attributes</code>, breaking callers that use <code>model.attributes.slice(...)</code> or <code>model.attributes.select { ... }</code>.</p>
83
+ </li></ul>
84
+
85
+ <h1 id="label-0.11.7">0.11.7</h1>
86
+ <ul><li>
87
+ <p>Relax anchormodel dependency, since anchormodel 0.4 is compatible</p>
88
+ </li></ul>
89
+
90
+ <h1 id="label-0.11.6">0.11.6</h1>
91
+ <ul><li>
92
+ <p>Enhance output of component’s <code>inspect</code></p>
93
+ </li><li>
94
+ <p>Add request context view helper <code>standalone_name</code></p>
95
+ </li></ul>
96
+
97
+ <h1 id="label-0.11.5">0.11.5</h1>
98
+ <ul><li>
99
+ <p>Replace deprecated <code>:unprocessable_entity</code> by <code>:unprocessable_content</code></p>
100
+ </li><li>
101
+ <p>In pre-built <code>:list</code> component, expose more details suitable for showing pagination information</p>
102
+ </li></ul>
103
+
104
+ <h1 id="label-0.11.4">0.11.4</h1>
105
+ <ul><li>
106
+ <p>Internal refactoring of submit button</p>
107
+ </li><li>
108
+ <p>Switch to anchormodel 0.3.0</p>
109
+ </li></ul>
110
+
111
+ <h1 id="label-0.11.3">0.11.3</h1>
112
+ <ul><li>
113
+ <p>Enhance error message when attachment reflection is missing</p>
114
+ </li></ul>
115
+
116
+ <h1 id="label-0.11.2">0.11.2</h1>
117
+ <ul><li>
118
+ <p>Harmonize authentication interface for the <code>:new</code> component</p>
119
+ <ul><li>
120
+ <p>When called via GET, and pointing to it from <code>:index</code>, check for permission on the data class</p>
121
+ </li><li>
122
+ <p>When called via POST, check for permission on the model instance</p>
123
+ </li></ul>
124
+ </li></ul>
125
+
126
+ <h1 id="label-0.11.1">0.11.1</h1>
127
+ <ul><li>
128
+ <p>Fix wrong naming in changelog</p>
129
+ </li><li>
130
+ <p>In pre-built <code>:new</code> component, switch authorization to the previously created data class and check for <code>new</code> in GET. This allows to:</p>
131
+ <ul><li>
132
+ <p>Build intents with prepared data, e.g. <code>Compony.intent(:new, Post.new(user_id: @data.id), path: { post: { user_id: @data.id } })</code></p>
133
+ </li><li>
134
+ <p>Make the <code>cancancan</code> ability watch for this, e.g. <code>can :manage, Post, user_id: user.id</code></p>
135
+ </li></ul>
136
+ </li></ul>
137
+
138
+ <h1 id="label-0.11.0">0.11.0</h1>
139
+ <ul><li>
140
+ <p>Remove <code>resourceful_sub_comp</code> as the intent API has made it obsolete.</p>
141
+ </li><li>
142
+ <p>Allow handling UUID style IDs in pre-built Show component</p>
143
+ </li><li>
144
+ <p>Fix a bug in intents preventing overriding the feasibility target</p>
145
+ </li></ul>
146
+
147
+ <h2 id="label-Steps+to+take">Steps to take</h2>
148
+ <ul><li>
149
+ <p>Search for <code>resourceful_sub_comp</code> and replace those calls by <code>render_sub_comp</code> while passing <code>@data</code> as the second intent argument.</p>
150
+ </li></ul>
151
+
152
+ <h1 id="label-0.10.2">0.10.2</h1>
153
+ <ul><li>
154
+ <p>Produce debug output when skipping an intent due to a NameError</p>
155
+ </li><li>
156
+ <p>When intents are given both a model (through data) and a family name (through the second argument), prefer the family name to find out the component class</p>
157
+ </li></ul>
158
+
159
+ <h1 id="label-0.10.1">0.10.1</h1>
160
+ <ul><li>
161
+ <p>Implement intent to always return the path it was initialized with in case the argument was given</p>
162
+ </li></ul>
163
+
164
+ <h1 id="label-0.10.0">0.10.0</h1>
165
+ <ul><li>
166
+ <p>Fix a bug in error message for <code>comp_class_for!</code></p>
167
+ </li><li>
168
+ <p>Replace <code>color</code> and <code>icon</code> by <code>button</code>. This new component DSL call provides defaults for <code>button</code> options when intents render, similar to <code>label</code>.</p>
169
+ </li><li>
170
+ <p>Allow blank intents (intents that have no component), useful for creating custom buttons within exposed intents.</p>
171
+ </li><li>
172
+ <p>Accept argument <code>turbo_frame</code> in <code>render_sub_comp</code></p>
173
+ </li><li>
174
+ <p>Fix a problem with translations when fastgettext is not installed</p>
175
+ </li><li>
176
+ <p>Update <code>Compony::Components::List</code>:</p>
177
+ <ul><li>
178
+ <p>Fix a problem where disabling only filtering caused a crash</p>
179
+ </li><li>
180
+ <p>Distinguish between boolean setters and <code>skip_</code> prefixes</p>
181
+ </li><li>
182
+ <p>Replace <code>row_action</code> by <code>row_intent</code></p>
183
+ </li></ul>
184
+ </li><li>
185
+ <p>Rename <code>ExposedIntentsDsl</code> to <code>ManageIntentsDsl</code>, allow passing options and ignore <code>add</code> call if the target component is not defined</p>
186
+ </li></ul>
187
+
188
+ <h2 id="label-Steps+to+take">Steps to take</h2>
189
+ <ul><li>
190
+ <p>In your components, replace code like <code>icon :eye</code> by: <code>button(:icon){ :eye }</code> or <code>button(:icon){|_| :eye }</code> (the latter in the resourceful case)</p>
191
+ </li><li>
192
+ <p>In your components, replace code like <code>color :danger</code> by: <code>button(:color){ :danger }</code> or <code>button(:color){|_| :danger }</code> (the latter in the resourceful case)</p>
193
+ </li><li>
194
+ <p>Check all your <code>List</code> components, as the interface has changed:</p>
195
+ <ul><li>
196
+ <p><code>skip_</code> DSL calls have been replaced by boolean writers.</p>
197
+ </li><li>
198
+ <p><code>row_action</code> has been replaced by <code>row_intents</code> which renders intents using <code>add</code> and <code>remove</code>.</p>
199
+ </li></ul>
200
+ </li></ul>
201
+
202
+ <h1 id="label-0.9.0">0.9.0</h1>
203
+ <ul><li>
204
+ <p>Enhance Intent API:</p>
205
+ <ul><li>
206
+ <p>Make <code>style</code> a property of the Intent rather than a button option.</p>
207
+ </li><li>
208
+ <p>No longer allow arbitrary options for building intents. Instead, options for buttons must be wrapped in <code>button: { class: &#39;...&#39; }</code>.</p>
209
+ </li></ul>
210
+ </li></ul>
211
+
212
+ <h2 id="label-Steps+to+take">Steps to take</h2>
213
+ <ul><li>
214
+ <p>Replace code like <code>button: { style: :link }</code> by simply <code>style: :link</code></p>
215
+ </li><li>
216
+ <p>Make sure that code like <code>button: { label: ... }</code> becomes simply: <code>label: ...</code></p>
217
+ </li><li>
218
+ <p>Make sure that all kwargs in intents meant for buttons are wrapped in <code>button: { ... }</code>.</p>
219
+ </li></ul>
220
+
221
+ <h1 id="label-0.8.1">0.8.1</h1>
222
+ <ul><li>
223
+ <p>Fix a problem in List resulting in <code>data_class</code> being read too early</p>
224
+ </li></ul>
225
+
226
+ <h1 id="label-0.8.0">0.8.0</h1>
227
+
228
+ <p>Be advised that this version brings major interface changes that will break existing applications. When upgrading, carefully follow sthe steps unter “Steps to take” and test your application thoroughly.</p>
229
+ <ul><li>
230
+ <p>Add <code>render_sub_comp</code> helper</p>
231
+ </li><li>
232
+ <p>Major API change: implement <code>Compony::Intent</code> as discussed in Issue #14:</p>
233
+ <ul><li>
234
+ <p>Rewire many pure helpers to use intents instead, greatly cleaning up their interface</p>
235
+ </li><li>
236
+ <p>Remove pure helpers <code>rails_action_name</code>, <code>path_helper_name</code>, <code>comp_cst</code> and <code>family_cst</code></p>
237
+ </li><li>
238
+ <p>Remove <code>button_defaults</code> and associated logic, as it was rarely used</p>
239
+ </li><li>
240
+ <p>Remove <code>Compony::Components::Button</code> and replace it by <code>Compony::Components::Buttons::Link</code> and <code>Compony::Components::Buttons::CssButton</code></p>
241
+ </li><li>
242
+ <p>Remove <code>Compony.button</code>, <code>compony_button</code> and <code>compony_link</code></p>
243
+ </li><li>
244
+ <p>Use intents in <code>sub_comp</code> and thus also in <code>resourceful_sub_comp</code>, allowing tho write something like <code>sub_comp :list, user.quotes</code></p>
245
+ </li></ul>
246
+ </li><li>
247
+ <p>Update documentation</p>
248
+ </li></ul>
249
+
250
+ <h2 id="label-Steps+to+take">Steps to take</h2>
251
+ <ul><li>
252
+ <p>Make sure you no longer use the following methods that have been removed:</p>
253
+ <ul><li>
254
+ <p><code>Compony.rails_action_name</code></p>
255
+ </li><li>
256
+ <p><code>Compony.path_helper_name</code></p>
257
+ </li><li>
258
+ <p><code>Compony.button_defaults</code></p>
259
+ </li><li>
260
+ <p><code>Compony.with_button_defaults</code></p>
261
+ </li><li>
262
+ <p><code>Compony.button_component_class=</code> (replace by button styles, see documentation)</p>
263
+ </li><li>
264
+ <p><code>Component.comp_cst</code> (replace by <code>comp_name</code>)</p>
265
+ </li><li>
266
+ <p><code>Component.family_cst</code> (replace by <code>family_name</code>)</p>
267
+ </li></ul>
268
+ </li><li>
269
+ <p>If using custom buttons, inherit from <code>Compony::Components::Buttons::Link</code> and adjust code as needed. Register your button with <code>Compony.register_button_style</code> and consider setting <code>Compony.default_button_style=</code>.</p>
270
+ </li><li>
271
+ <p>Search for each following keywords in your application and replace it as follows:</p>
272
+ <ul><li>
273
+ <p>Replace root actions (<code>action ... do</code> and <code>skip_action</code>) by exposed intents (see documentation).</p>
274
+ </li><li>
275
+ <p>Replace <code>render_actions</code> or <code>compony_actions</code> by a custom loop of the kind <code>Compony.root_comp&amp;.exposed_intents&amp;.map { |i| i.render(controller) }</code></p>
276
+ </li><li>
277
+ <p>Replace buttons and change any <code>params:</code> to <code>path:</code>; as well as <code>label_format</code> or <code>label_opts: { format: ... }</code> by something like: <code>render_intent(:show, @data, button: { label: { format: :short } })</code>:</p>
278
+ </li><li>
279
+ <p><code>Compony.button</code> was typically used in a component’s root actions and should thus already have been replaced in the previous step.</p>
280
+ </li><li>
281
+ <p>Replace <code>compony_button</code> by <code>render_intent</code></p>
282
+ </li><li>
283
+ <p>Replace <code>compony_link</code> by <code>render_intent</code> and pass <code>button: { style: :link }</code> as an argument</p>
284
+ </li></ul>
285
+ </li><li>
286
+ <p>Enhancement: Consider replacing patterns like <code>sub_comp(Components::Quotes::List, data: user.quotes).render(controller)</code> by <code>render_sub_comp(:list, user.quotes)</code>.</p>
287
+ </li></ul>
288
+
289
+ <h1 id="label-0.7.1">0.7.1</h1>
290
+ <ul><li>
291
+ <p>Implement <code>Compony::VirtualModel</code> and document it in the Readme file</p>
292
+ </li><li>
293
+ <p>Break up documentation into separate files</p>
294
+ </li></ul>
295
+
296
+ <h1 id="label-0.7.0">0.7.0</h1>
297
+ <ul><li>
298
+ <p>Rename Component’s internal <code>path</code> to <code>id_path</code> to distinguish it from Rails paths, as well as <code>path_hash</code> to <code>id_path_hash</code></p>
299
+ </li><li>
300
+ <p>(internal change): switch <code>WithForm</code>‘s default <code>submit_path</code> block to <code>Compony.path</code> logic</p>
301
+ </li><li>
302
+ <p>Implement new component DSL method <code>path</code>, closes #13</p>
303
+ <ul><li>
304
+ <p>The method allows components to define the path pointing towards them (the default behavior corresponds to that of <code>Compony.path</code> of previous versions)</p>
305
+ </li><li>
306
+ <p>Adjust <code>Compony.path</code> to instanciate the target component and use the <code>path</code> block rather than come up with the path on its own</p>
307
+ </li></ul>
308
+ </li></ul>
309
+
310
+ <h2 id="label-Steps+to+take">Steps to take</h2>
311
+ <ul><li>
312
+ <p>If using the methods formerly called <code>path</code> or <code>path_hash</code>, rename them to <code>id_path</code> respectively <code>id_path_hash</code>.</p>
313
+ </li></ul>
314
+
315
+ <h1 id="label-0.6.4">0.6.4</h1>
316
+ <ul><li>
317
+ <p>Replace Feasibility’s error message generation in case of dependent errors by a logic that fits fastgettext’s modern pluralization</p>
318
+ </li></ul>
319
+
320
+ <h1 id="label-0.6.3">0.6.3</h1>
321
+ <ul><li>
322
+ <p>Restrict multi-attachments to upload only when the form’s object is a new record</p>
323
+ </li></ul>
324
+
325
+ <h1 id="label-0.6.2">0.6.2</h1>
326
+ <ul><li>
327
+ <p>Change download link label of attachments from “Download” to the actual filename</p>
328
+ </li><li>
329
+ <p>Support multiple attachments by providing a simple UI for adding and removing attachments</p>
330
+ </li></ul>
331
+
332
+ <h1 id="label-0.6.1">0.6.1</h1>
333
+ <ul><li>
334
+ <p>Implement <code>default_sorting</code> in <code>Compony::Components::List</code></p>
335
+ </li></ul>
336
+
337
+ <h1 id="label-0.6.0">0.6.0</h1>
338
+ <ul><li>
339
+ <p>Implement <code>Compony::Components::Show</code></p>
340
+ </li><li>
341
+ <p>Implement <code>Compony::Components::Index</code> and <code>Compony::Components::List</code></p>
342
+ </li></ul>
343
+
344
+ <h1 id="label-0.5.9">0.5.9</h1>
345
+ <ul><li>
346
+ <p>Fix a bug in generator that was introduced with the previous commit</p>
347
+ </li></ul>
348
+
349
+ <h1 id="label-0.5.8">0.5.8</h1>
350
+ <ul><li>
351
+ <p>Apply most recent rubocop recommendations</p>
352
+ </li><li>
353
+ <p>Update rubocop</p>
354
+ </li><li>
355
+ <h1 id="label-10-3A+Implement+feasibility+framework+for+links">10: Implement feasibility framework for links</h1>
356
+ </li><li>
357
+ <p>Support <code>BaseComponents</code></p>
358
+ </li></ul>
359
+
360
+ <h1 id="label-0.5.7">0.5.7</h1>
361
+ <ul><li>
362
+ <p>Fix a minor bug causing unnecessary param <code>id</code> to be added to the path after creating or updating when redirecting back to the index component</p>
363
+ </li></ul>
364
+
365
+ <h1 id="label-0.5.6">0.5.6</h1>
366
+ <ul><li>
367
+ <p>Allow overriding the label in the view helper <code>compony_link</code></p>
368
+ </li></ul>
369
+
370
+ <h1 id="label-0.5.5">0.5.5</h1>
371
+ <ul><li>
372
+ <p>Support <code>has_one</code> associations for feasibility</p>
373
+ </li></ul>
374
+
375
+ <h1 id="label-0.5.4">0.5.4</h1>
376
+ <ul><li>
377
+ <p>Fix a failure description in Form</p>
378
+ </li><li>
379
+ <p>Support <code>multilang: true</code> in <code>ModelMixin</code>‘s and <code>Form</code>’s <code>field</code> call, as well as in <code>Form</code>‘s <code>schema_field</code></p>
380
+ </li><li>
381
+ <p>Allow customizing parameters for form builder</p>
382
+ </li><li>
383
+ <p>Implement <code>skip_forgery_protection!</code></p>
384
+ </li></ul>
385
+
386
+ <h1 id="label-0.5.3">0.5.3</h1>
387
+ <ul><li>
388
+ <p>Support <code>standalone_name</code> in <code>Compony.button</code> and <code>compony_link</code></p>
389
+ </li><li>
390
+ <p>Support passing component classes directly to <code>compony_link</code></p>
391
+ </li><li>
392
+ <p>Support <code>button_params</code> in regular buttons</p>
393
+ </li><li>
394
+ <p>Support <code>value</code> in submit buttons</p>
395
+ </li><li>
396
+ <p>Support <code>disable!</code> and <code>disabled: true</code> in Form, disabling all inputs</p>
397
+ </li></ul>
398
+
399
+ <h1 id="label-0.5.2">0.5.2</h1>
400
+ <ul><li>
401
+ <p>Add <code>constraints</code> to <code>standalone</code></p>
402
+ </li><li>
403
+ <p>Add <code>scope</code> and <code>scope_args</code> to <code>standalone</code></p>
404
+ </li><li>
405
+ <p>Set default <code>label_method</code> to <code>label</code> when generating a <code>simple_form</code> input for <code>:association</code></p>
406
+ </li></ul>
407
+
408
+ <h1 id="label-0.5.1">0.5.1</h1>
409
+ <ul><li>
410
+ <p>Correctly handle <code>ActiveType::Object</code> virtual fields in Rails 7.2</p>
411
+ </li></ul>
412
+
413
+ <h1 id="label-0.5.0">0.5.0</h1>
414
+ <ul><li>
415
+ <p>Require Ruby 3.3.5 and Rails 7.2.1</p>
416
+ </li><li>
417
+ <p>Update Gems Compony depends on (this is to ensure all Compony users have versions Compony is frequently tested against)</p>
418
+ </li></ul>
419
+
420
+ <h2 id="label-Steps+to+take">Steps to take</h2>
421
+ <ul><li>
422
+ <p>Update your application to Ruby 3.3.5 and Rails 7.2.1. For instance, if you are running an rbenv setup, these would be typical steps involved:</p>
423
+ </li><li>
424
+ <p>set <code>rbenv local 3.3.5</code> and perhaps restart your editor (in particular with VS code)</p>
425
+ </li><li>
426
+ <p>In your Gemfile:</p>
427
+ <ul><li>
428
+ <p>switch ruby version to <code>3.3.5</code></p>
429
+ </li><li>
430
+ <p>switch Rails version to <code>7.2.1</code></p>
431
+ </li></ul>
432
+ </li><li>
433
+ <p>Run bundler:</p>
434
+ <ul><li>
435
+ <p>Update bundler itself: <code>bundle update --bundler</code></p>
436
+ </li><li>
437
+ <p>Run <code>bundle update</code> or <code>bundle update --conservative</code> depending on your preference.</p>
438
+ </li></ul>
439
+ </li><li>
440
+ <p>Check for warnings and react accordingly</p>
441
+ </li></ul>
442
+
443
+ <h1 id="label-0.4.1">0.4.1</h1>
444
+ <ul><li>
445
+ <p>Allow the argument <code>standalone_name</code> in button and path helper</p>
446
+ </li><li>
447
+ <p>Provide family and comp name accessors in the static context as well for convenience</p>
448
+ </li><li>
449
+ <p>Make <code>Compony.path</code> accept a component class as well</p>
450
+ </li><li>
451
+ <p>Make Compony.button accept a component as well. Works in combination with passing a model.</p>
452
+ </li><li>
453
+ <p>Fix a bug that caused an override of input option arguments if the <code>accept</code> parameter is present</p>
454
+ </li></ul>
455
+
456
+ <h1 id="label-0.4.0">0.4.0</h1>
457
+ <ul><li>
458
+ <p>Support Cancancan’s <code>accessible_attributes</code></p>
459
+ </li><li>
460
+ <p>Cancancan has fixed <a href="https://github.com/CanCanCommunity/cancancan/issues/838">github.com/CanCanCommunity/cancancan/issues/838</a></p>
461
+ </li><li>
462
+ <p>Automatically declare all fields as ActiveModel attributes</p>
463
+ <ul><li>
464
+ <p>When using this feature together with ActiveType, be sure to add <code>include ActiveModel::Attributes</code> at the top of your virtual models.</p>
465
+ </li><li>
466
+ <p>Due to Rails’ implementation of <code>authenticate_by</code>, <code>:password</code> and <code>:password_confirmation</code> can not be attributes and thus should no longer be declared as fields in your applications.</p>
467
+ </li><li>
468
+ <p>To handle password fields in forms, <code>pw_field</code> and <code>schema_pw_field</code> were added</p>
469
+ </li></ul>
470
+ </li><li>
471
+ <p>Require <code>cancancan_action</code> for every Form, respectively <code>form_cancancan_action</code> for every WithForm</p>
472
+ </li><li>
473
+ <p>Filter form fields by Cancancan action, effectively providing per-field authorization</p>
474
+ </li><li>
475
+ <p>Attention, this feature is only used when using <code>field</code> and <code>schema_field</code>, it will not affect custom inputs or schema lines.</p>
476
+ </li><li>
477
+ <p>Require Ruby 3.2.2</p>
478
+ </li></ul>
479
+
480
+ <h2 id="label-Steps+to+perform">Steps to perform</h2>
481
+ <ul><li>
482
+ <p>If using ActiveType, add <code>include ActiveModel::Attributes</code> at the top of your virtual models.</p>
483
+ </li><li>
484
+ <p>In your User model, remove <code>field :password</code> and <code>field :password_confirmation</code></p>
485
+ </li><li>
486
+ <p>If on login, you get the ArgumentError “One or more password arguments are required”, you have forgotten to do this.</p>
487
+ </li><li>
488
+ <p>In your User Form:</p>
489
+ </li><li>
490
+ <p>replace <code>concat field :password</code> by <code>concat pw_field :password</code></p>
491
+ </li><li>
492
+ <p>replace <code>concat field :password_confirmation</code> by <code>concat pw_field :password_confirmation</code></p>
493
+ </li><li>
494
+ <p>replace <code>schema_field :password</code> by <code>schema_pw_field :password</code></p>
495
+ </li><li>
496
+ <p>replace <code>schema_field :password_confirmation</code> by <code>schema_pw_field :password_confirmation</code></p>
497
+ </li><li>
498
+ <p>Make sure your forms work as expected, as cancancan action is now required (see above).</p>
499
+ </li><li>
500
+ <p>Either supply the appropriate action (e.g. <code>:edit</code> or <code>:new</code>), or pass <code>nil</code> to disable per-field authorization for a form.</p>
501
+ </li></ul>
502
+
503
+ <h1 id="label-0.3.3">0.3.3</h1>
504
+ <ul><li>
505
+ <p>In <code>RequestContext</code>, distinguish between <code>content</code> and <code>content!</code>, where the first allows for missing content blocks.</p>
506
+ </li></ul>
507
+
508
+ <h1 id="label-0.3.2">0.3.2</h1>
509
+ <ul><li>
510
+ <p>Add label content block to edit component</p>
511
+ </li><li>
512
+ <p>Introduce <code>remove_content!</code> and make its non-bang pendant tolerate missing blocks</p>
513
+ </li></ul>
514
+
515
+ <h1 id="label-0.3.1">0.3.1</h1>
516
+ <ul><li>
517
+ <p>In <code>NaturalOrdering</code>, tolerate omitting payload only if it’s an override</p>
518
+ </li><li>
519
+ <p>In <code>content</code>, tolerate omitting block if it’s an override</p>
520
+ </li><li>
521
+ <p>Instanciate a fresh ActionView <code>output_buffer</code> when rendering nested content to prevent double render errors</p>
522
+ </li><li>
523
+ <p>Reshape <code>Destroy</code> and <code>Form</code> components to provide more fine-grained content blocks that can be selectively overridden</p>
524
+ </li><li>
525
+ <p>Implement <code>remove_content</code> which allows removing a previously defined content block (useful for usage in subclasses)</p>
526
+ </li></ul>
527
+
528
+ <h1 id="label-0.3.0">0.3.0</h1>
529
+ <ul><li>
530
+ <p>Internals:</p>
531
+ </li><li>
532
+ <p>Change internal parameter handling in edit and update (now use validated params only)</p>
533
+ </li><li>
534
+ <p>Create <code>NaturalOrdering</code> which provides an interface for the <code>action</code> call behavior</p>
535
+ </li><li>
536
+ <p>Switch actions to <code>NaturalOrdering</code></p>
537
+ </li><li>
538
+ <p>Remove redundant code</p>
539
+ </li><li>
540
+ <p>Remove <code>Component</code>‘s dynamic <code>comp_class_for</code> and <code>comp_class_for!</code></p>
541
+ </li><li>
542
+ <p>Switch <code>content</code> to <code>NaturalOrdering</code>, enabling <code>before:</code></p>
543
+ </li><li>
544
+ <p>Remove <code>add_content</code></p>
545
+ </li><li>
546
+ <p>Switch <code>before_render</code> to <code>NaturalOrdering</code>, allowing having multiple <code>before_render</code> blocks and overwriting them selectively</p>
547
+ </li><li>
548
+ <p>This change is backwards-compatible as the default behavior of <code>before_render</code> is to overwrite <code>:main</code>.</p>
549
+ </li><li>
550
+ <p>Implement nesting of content blocks, as described in README.md -&gt; “Nesting content blocks, calling a content block from another”</p>
551
+ </li></ul>
552
+
553
+ <h2 id="label-Steps+to+take">Steps to take</h2>
554
+ <ul><li>
555
+ <p>Search for <code>comp_class_for</code> and <code>comp_class_for!</code> and replace them by <code>Compony.comp_class_for</code> and <code>Compony.comp_class_for!</code></p>
556
+ </li><li>
557
+ <p>Search for <code>add_content</code> and replace it by <code>content</code> along with a name. If you used an index in <code>add_content</code>, replace it by <code>before:</code> (see documentation)</p>
558
+ </li></ul>
559
+
560
+ <h1 id="label-0.2.3">0.2.3</h1>
561
+ <ul><li>
562
+ <p>Support collection of Anchormodels in hidden input</p>
563
+ </li></ul>
564
+
565
+ <h1 id="label-0.2.2">0.2.2</h1>
566
+ <ul><li>
567
+ <p>Adjust gemspec</p>
568
+ </li><li>
569
+ <p>Generate documentation</p>
570
+ </li><li>
571
+ <p>Add VERSION file</p>
572
+ </li><li>
573
+ <p>Replace custom anchormodel field implementation by Anchormodel’s new implementation of SimpleForm Input</p>
574
+ </li></ul>
575
+
576
+ <h1 id="label-0.2.1">0.2.1</h1>
577
+ <ul><li>
578
+ <p>Fix a bug where the app crashed on HEAD verb</p>
579
+ </li><li>
580
+ <p>Show more details about failing authorization block</p>
581
+ </li><li>
582
+ <p>Implement <code>submit_path</code> DSL call for WithForm</p>
583
+ </li><li>
584
+ <p>Add French translation</p>
585
+ </li><li>
586
+ <p>Implement <code>skip_autofocus</code> in Form</p>
587
+ </li><li>
588
+ <p>Allow partial override of standalone verb configs. Example: <code>ruby verb :get do authorize { true } end verb :post do authorize { true } # Parent class implements more logic here, which will no longer be overwritten by calling `verb :post`. end </code></p>
589
+ </li></ul>
590
+
591
+ <h1 id="label-0.2.0">0.2.0</h1>
592
+ <ul><li>
593
+ <p>Cleanup old code</p>
594
+ </li><li>
595
+ <p>Remove <code>check_config!</code> that was barely used</p>
596
+ </li></ul>
597
+
598
+ <h1 id="label-0.1.1">0.1.1</h1>
599
+ <ul><li>
600
+ <p>Support and force Rails 7.1.2</p>
601
+ </li></ul>
602
+
603
+ <h2 id="label-Steps+to+perform">Steps to perform</h2>
604
+ <ul><li>
605
+ <p>in <code>config/application.rb</code>, replace <code>config.load_defaults 7.0</code> by <code>config.load_defaults 7.1</code> and add: <code>ruby # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. config.autoload_lib(ignore: %w(assets tasks)) </code></p>
606
+ </li></ul>
607
+
608
+ <h1 id="label-0.1.0">0.1.0</h1>
609
+ <ul><li>
610
+ <p>Remove (hopefully) obsolete database safeguard in <code>resolve_association!</code> as we should no longer be accessing the DB.</p>
611
+ </li><li>
612
+ <p>BREAKING: Remove <code>primary_key_type</code> and tolerate int and str as primary and foreign key in all params.</p>
613
+ </li><li>
614
+ <p>This fixes a bug introduced in 0.0.10 breaking polymorphic relations.</p>
615
+ </li><li>
616
+ <p>Support Rails 7.1</p>
617
+ </li><li>
618
+ <p>No longer rely on <code>controller.response.body.blank?</code> but use <code>controller.response_body.nil?</code> instead</p>
619
+ </li></ul>
620
+
621
+ <h2 id="label-Steps+to+perform">Steps to perform</h2>
622
+ <ul><li>
623
+ <p>Remove any calls to <code>primary_key_type</code></p>
624
+ </li></ul>
625
+
626
+ <h1 id="label-0.0.9">0.0.9</h1>
627
+
628
+ <p>Do not use.</p>
629
+ <ul><li>
630
+ <p>Support forms with references to tables with uuid type primary key</p>
631
+ </li><li>
632
+ <p>Support for <code>owned_by</code> in model:</p>
633
+ </li><li>
634
+ <p>Smart redirect</p>
635
+ </li><li>
636
+ <p>Auto-generate a back / cancel button</p>
637
+ </li><li>
638
+ <p>Add <code>clear_standalone!</code> to components</p>
639
+ </li><li>
640
+ <p>Allow passing an array to <code>prevent</code> to prevent multiple actions at once</p>
641
+ </li><li>
642
+ <p>Add features <code>Compony.content_before_root_comp</code> and <code>Compony.content_after_root_comp</code></p>
643
+ </li><li>
644
+ <p>Add new field kind percentage</p>
645
+ </li></ul>
646
+
647
+ <h2 id="label-KNOWN+BUGS">KNOWN BUGS</h2>
648
+ <ul><li>
649
+ <p>This version breaks polymorphic relations.</p>
650
+ </li></ul>
651
+
652
+ <h1 id="label-0.0.8">0.0.8</h1>
653
+ <ul><li>
654
+ <p>Support selecting anchormodel inputs via radio buttons</p>
655
+ </li><li>
656
+ <p>Fix <code>value_for</code> for associations to elements that have no show component</p>
657
+ </li><li>
658
+ <p>Fix spacing problem with invisible action buttons</p>
659
+ </li><li>
660
+ <p>Pass the controller as argument to action buttons</p>
661
+ </li><li>
662
+ <p>Support option <code>:label</code> in <code>value_for</code> of date and datetime, support superfluous options in association</p>
663
+ </li><li>
664
+ <p>Support argument list in form generator</p>
665
+ </li><li>
666
+ <p>Create new model field type :color</p>
667
+ </li></ul>
668
+
669
+ <h1 id="label-0.0.7">0.0.7</h1>
670
+ <ul><li>
671
+ <p>Fix <code>standalone_access_permitted_for?</code> check for buttons pointing to non-get verbs</p>
672
+ </li></ul>
673
+
674
+ <h1 id="label-0.0.6">0.0.6</h1>
675
+ <ul><li>
676
+ <p>Fix a bug that breaks hidden fields of type reference</p>
677
+ </li><li>
678
+ <p>Add dynamic method “field” to model mixin</p>
679
+ </li><li>
680
+ <p>Tolerate and skip actions that do not define buttons, allows for dynamic action skipping</p>
681
+ </li><li>
682
+ <p>Fix <code>value_for</code> for boolean fields when they are nil</p>
683
+ </li><li>
684
+ <p>BREAKING: Rename <code>on_created</code> to <code>on_created_respond</code>, <code>on_updated</code> to <code>on_updated_respond</code>, and <code>on_destroyed</code> to <code>on_destroyed_respond</code></p>
685
+ </li><li>
686
+ <p>New hooks <code>on_created</code>, <code>on_updated</code>, and <code>on_destroyed</code> are called before their <code>_respond</code> counterpart</p>
687
+ </li><li>
688
+ <p>Fix a bug in Attachment Field</p>
689
+ </li><li>
690
+ <p>Support overriding simpleform name by providing <code>name:</code> as an argument to field.simpleform_input</p>
691
+ </li><li>
692
+ <p>In ModelField Anchormodel, tolerate “value” as input_html key and infer correct constant, allow form.object to be missing</p>
693
+ </li></ul>
694
+
695
+ <h1 id="label-0.0.5">0.0.5</h1>
696
+ <ul><li>
697
+ <p>Fix row bug for Email field type</p>
698
+ </li><li>
699
+ <p>Auto-focus first non-hidden element in forms</p>
700
+ </li><li>
701
+ <p>Add field type :url</p>
702
+ </li><li>
703
+ <p>Automatically set the correct class when generating known components</p>
704
+ </li><li>
705
+ <p>Add generator <code>components</code> that is able to mass-produce the most used components</p>
706
+ </li><li>
707
+ <p>Make fields point to the correct <code>model_class</code> in case of STI</p>
708
+ </li><li>
709
+ <p>Support hidden Anchormodel fields</p>
710
+ </li></ul>
711
+
712
+ <h2 id="label-KNOWN+BUGS">KNOWN BUGS</h2>
713
+ <ul><li>
714
+ <p>Breaks hidden fields of type reference</p>
715
+ </li></ul>
716
+
717
+ <h1 id="label-0.0.4">0.0.4</h1>
718
+ <ul><li>
719
+ <p>Unscope the namespace of resourceful components</p>
720
+ </li><li>
721
+ <p>Add field type :email</p>
722
+ </li></ul>
723
+
724
+ <h2 id="label-Steps+to+take">Steps to take</h2>
725
+ <ul><li>
726
+ <p>When inheriting from components, replace <code>Components::Resourceful::...</code> by <code>Components::...</code></p>
727
+ </li></ul>
728
+
729
+ <h1 id="label-0.0.3">0.0.3</h1>
730
+ <ul><li>
731
+ <p>Tolerate nil anchormodels</p>
732
+ </li><li>
733
+ <p>Fix a nil pointer bug in namespace management</p>
734
+ </li></ul>
735
+
736
+ <h1 id="label-0.0.2">0.0.2</h1>
737
+ <ul><li>
738
+ <p>Add new model field <code>Attachment</code></p>
739
+ </li><li>
740
+ <p>Slightly extend documentation</p>
741
+ </li><li>
742
+ <p>Update <code>Gemfile.lock</code></p>
743
+ </li></ul>
744
+
745
+ <h1 id="label-0.0.1">0.0.1</h1>
746
+
747
+ <p>First version</p>
748
+ </div></div>
749
+
750
+ <div id="footer">
751
+ Generated on Mon May 18 13:55:32 2026 by
752
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
753
+ 0.9.34 (ruby-3.3.5).
754
+ </div>
755
+
756
+ </div>
757
+ </body>
758
+ </html>