compony 0.11.12 → 0.11.14

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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -0
  3. data/CHANGELOG.md +16 -0
  4. data/CLAUDE.md +1 -0
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock +145 -106
  7. data/README.md +12 -1
  8. data/Rakefile +10 -0
  9. data/TODO.md +2 -1
  10. data/VERSION +1 -1
  11. data/compony.gemspec +5 -3
  12. data/doc/ComponentGenerator.html +1 -1
  13. data/doc/Components.html +1 -1
  14. data/doc/ComponentsGenerator.html +1 -1
  15. data/doc/Compony/Component.html +1 -1
  16. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  17. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  18. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  19. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  20. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  21. data/doc/Compony/ComponentMixins/Default.html +1 -1
  22. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  23. data/doc/Compony/ComponentMixins.html +1 -1
  24. data/doc/Compony/Components/Buttons/CssButton.html +1 -1
  25. data/doc/Compony/Components/Buttons/Link.html +1 -1
  26. data/doc/Compony/Components/Buttons.html +1 -1
  27. data/doc/Compony/Components/Destroy.html +1 -1
  28. data/doc/Compony/Components/Edit.html +1 -1
  29. data/doc/Compony/Components/Form.html +41 -41
  30. data/doc/Compony/Components/Index.html +1 -1
  31. data/doc/Compony/Components/List.html +1 -1
  32. data/doc/Compony/Components/New.html +1 -1
  33. data/doc/Compony/Components/Show.html +1 -1
  34. data/doc/Compony/Components/WithForm.html +1 -1
  35. data/doc/Compony/Components.html +1 -1
  36. data/doc/Compony/ControllerMixin.html +1 -1
  37. data/doc/Compony/Engine.html +1 -1
  38. data/doc/Compony/Intent.html +1 -1
  39. data/doc/Compony/ManageIntentsDsl.html +2 -2
  40. data/doc/Compony/MethodAccessibleHash.html +1 -1
  41. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  42. data/doc/Compony/ModelFields/Association.html +1 -1
  43. data/doc/Compony/ModelFields/Attachment.html +1 -1
  44. data/doc/Compony/ModelFields/Base.html +8 -2
  45. data/doc/Compony/ModelFields/Boolean.html +1 -1
  46. data/doc/Compony/ModelFields/Color.html +1 -1
  47. data/doc/Compony/ModelFields/Currency.html +1 -1
  48. data/doc/Compony/ModelFields/Date.html +1 -1
  49. data/doc/Compony/ModelFields/Datetime.html +1 -1
  50. data/doc/Compony/ModelFields/Decimal.html +1 -1
  51. data/doc/Compony/ModelFields/Email.html +1 -1
  52. data/doc/Compony/ModelFields/Float.html +1 -1
  53. data/doc/Compony/ModelFields/Integer.html +1 -1
  54. data/doc/Compony/ModelFields/Percentage.html +1 -1
  55. data/doc/Compony/ModelFields/Phone.html +1 -1
  56. data/doc/Compony/ModelFields/RichText.html +1 -1
  57. data/doc/Compony/ModelFields/String.html +1 -1
  58. data/doc/Compony/ModelFields/Text.html +1 -1
  59. data/doc/Compony/ModelFields/Time.html +1 -1
  60. data/doc/Compony/ModelFields/Url.html +1 -1
  61. data/doc/Compony/ModelFields.html +1 -1
  62. data/doc/Compony/ModelMixin.html +13 -13
  63. data/doc/Compony/NaturalOrdering.html +1 -1
  64. data/doc/Compony/RequestContext.html +1 -1
  65. data/doc/Compony/Version.html +1 -1
  66. data/doc/Compony/ViewHelpers.html +1 -1
  67. data/doc/Compony/VirtualModel.html +1 -1
  68. data/doc/Compony.html +276 -92
  69. data/doc/ComponyController.html +1 -1
  70. data/doc/_index.html +1 -1
  71. data/doc/file.CHANGELOG.html +89 -77
  72. data/doc/file.README.html +21 -11
  73. data/doc/file.basic_component.html +14 -14
  74. data/doc/file.cookbook.html +27 -27
  75. data/doc/file.destroy.html +2 -2
  76. data/doc/file.dsl_reference.html +199 -199
  77. data/doc/file.edit.html +3 -3
  78. data/doc/file.example.html +13 -13
  79. data/doc/file.example_advanced.html +10 -10
  80. data/doc/file.feasibility.html +2 -2
  81. data/doc/file.form.html +20 -8
  82. data/doc/file.generators.html +3 -3
  83. data/doc/file.glossary.html +44 -44
  84. data/doc/file.gotchas.html +35 -35
  85. data/doc/file.index.html +10 -10
  86. data/doc/file.inheritance.html +5 -5
  87. data/doc/file.installation.html +9 -9
  88. data/doc/file.integrations.html +46 -46
  89. data/doc/file.intents.html +11 -11
  90. data/doc/file.internal_datastructures.html +6 -6
  91. data/doc/file.list.html +35 -35
  92. data/doc/file.maintaining.html +21 -21
  93. data/doc/file.model_fields.html +3 -3
  94. data/doc/file.nesting.html +5 -5
  95. data/doc/file.new.html +3 -3
  96. data/doc/file.ownership.html +2 -2
  97. data/doc/file.patterns.html +50 -50
  98. data/doc/file.pre_built_components.html +2 -2
  99. data/doc/file.resourceful.html +5 -5
  100. data/doc/file.show.html +17 -17
  101. data/doc/file.standalone.html +12 -12
  102. data/doc/file.virtual_models.html +2 -2
  103. data/doc/file.with_form.html +23 -23
  104. data/doc/guide/pre_built_components/form.md +21 -2
  105. data/doc/index.html +21 -11
  106. data/doc/method_list.html +16 -0
  107. data/doc/top-level-namespace.html +1 -1
  108. data/lib/compony/components/form.rb +5 -4
  109. data/lib/compony/model_fields/base.rb +3 -0
  110. data/lib/compony/model_mixin.rb +3 -2
  111. data/lib/compony.rb +19 -0
  112. data/spec/README.md +22 -0
  113. data/spec/compony/component_spec.rb +80 -0
  114. data/spec/compony/components/form_spec.rb +31 -0
  115. data/spec/compony/compony_spec.rb +130 -0
  116. data/spec/compony/intent_spec.rb +94 -0
  117. data/spec/compony/method_accessible_hash_spec.rb +32 -0
  118. data/spec/compony/model_fields_spec.rb +70 -0
  119. data/spec/compony/model_mixin_spec.rb +109 -0
  120. data/spec/compony/natural_ordering_spec.rb +61 -0
  121. data/spec/dummy/app/components/statics/home.rb +17 -0
  122. data/spec/dummy/app/components/statics/secret.rb +15 -0
  123. data/spec/dummy/app/components/users/destroy.rb +2 -0
  124. data/spec/dummy/app/components/users/edit.rb +2 -0
  125. data/spec/dummy/app/components/users/form.rb +14 -0
  126. data/spec/dummy/app/components/users/index.rb +29 -0
  127. data/spec/dummy/app/components/users/new.rb +2 -0
  128. data/spec/dummy/app/components/users/show.rb +26 -0
  129. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  130. data/spec/dummy/app/models/ability.rb +7 -0
  131. data/spec/dummy/app/models/application_record.rb +4 -0
  132. data/spec/dummy/app/models/user.rb +22 -0
  133. data/spec/dummy/app/views/layouts/application.html.erb +7 -0
  134. data/spec/dummy/config/application.rb +20 -0
  135. data/spec/dummy/config/database.yml +3 -0
  136. data/spec/dummy/config/environment.rb +3 -0
  137. data/spec/dummy/config/initializers/simple_form.rb +9 -0
  138. data/spec/dummy/config/routes.rb +3 -0
  139. data/spec/dummy/db/schema.rb +14 -0
  140. data/spec/rails_helper.rb +23 -0
  141. data/spec/requests/authorization_spec.rb +16 -0
  142. data/spec/requests/plain_component_spec.rb +9 -0
  143. data/spec/requests/routing_spec.rb +20 -0
  144. data/spec/requests/users_crud_spec.rb +99 -0
  145. metadata +63 -1
@@ -58,26 +58,38 @@
58
58
  </div>
59
59
 
60
60
  <div id="content"><div id='filecontents'>
61
- <h1 id="label-0.11.12">0.11.12</h1>
61
+ <h1 id="01114">0.11.14</h1>
62
+ <ul><li>
63
+ <p>Add <code>Compony.content_locales=</code>, the locales for which <code>multilang: true</code> generates suffixed fields in the model’s <code>field</code>, the form’s <code>field</code> and <code>schema_field</code>. Defaults to <code>I18n.available_locales</code>, so existing apps are unaffected. Set it when the app’s locales differ from the languages its content is stored in, e.g. regional locales such as <code>:&quot;de-CH&quot;</code> with content stored per language. Accepts an array or a callable. See the form guide, “Content locales”.</p>
64
+ </li></ul>
65
+
66
+ <h1 id="01113">0.11.13</h1>
67
+ <ul><li>
68
+ <p>Fix <code>value_for</code> raising <code>NoMethodError</code> for a field that answers with nil, e.g. a <code>:percentage</code> field whose value cannot be computed. Such a value is now rendered as nil instead of being handed to the type’s transformation, which mirrors the behavior for enumerable values, whose nil entries have always been dropped.</p>
69
+ </li><li>
70
+ <p>Add an RSpec test suite (<code>bundle exec rspec</code> / <code>rake spec</code>) with a dummy Rails app under <code>spec/dummy</code>, covering the module API, intents, feasibility, model fields, routing and the pre-built CRUD components. See <code>spec/README.md</code> for layout and version pins. New development dependencies: <code>rspec-rails</code>, <code>sqlite3</code>.</p>
71
+ </li></ul>
72
+
73
+ <h1 id="01112">0.11.12</h1>
62
74
  <ul><li>
63
75
  <p>Add Spanish (<code>es</code>) translations.</p>
64
76
  </li></ul>
65
77
 
66
- <h1 id="label-0.11.11">0.11.11</h1>
78
+ <h1 id="01111">0.11.11</h1>
67
79
  <ul><li>
68
- <p>Fix the <code>New</code> component’s <code>method: :post</code> intent button (immediate create, no form) being hidden for non-admin users. The POST verb’s <code>authorize</code> checked <code>can?(:create, @data)</code>, but the button-visibility probe (<code>standalone_access_permitted_for?</code>) evaluates <code>authorize</code> <em>without</em> running <code>load_data</code>, so <code>@data</code> is <code>nil</code> at probe time. CanCan rules that target the class (e.g. <code>can :create, PosTransaction</code>) do not match a <code>nil</code> subject, so the button vanished — while <code>can :manage, :all</code> (admins) still matched. Changed to <code>can?(:create, @data || data_class)</code>: instance check during a real POST (where <code>load_data</code> already set <code>@data</code>), class check during the probe — symmetric with the GET verb’s <code>can?(:new, data_class)</code>.</p>
80
+ <p>Fix the <code>New</code> component’s <code>method: :post</code> intent button (immediate create, no form) being hidden for non-admin users. The POST verb’s <code>authorize</code> checked <code>can?(:create, @data)</code>, but the button-visibility probe (<code>standalone_access_permitted_for?</code>) evaluates <code>authorize</code> <em>without</em> running <code>load_data</code>, so <code>@data</code> is <code>nil</code> at probe time. CanCan rules that target the class (e.g. <code>can :create, PosTransaction</code>) do not match a <code>nil</code> subject, so the button vanished — while <code>can :manage, :all</code> (admins) still matched. Changed to <code>can?(:create, @data || data_class)</code>: instance check during a real POST (where <code>load_data</code> already set <code>@data</code>), class check during the probe — symmetric with the GET verb’s <code>can?(:new, data_class)</code>.</p>
69
81
  </li></ul>
70
82
 
71
- <h1 id="label-0.11.10">0.11.10</h1>
83
+ <h1 id="01110">0.11.10</h1>
72
84
  <ul><li>
73
85
  <p>Fix <code>Compony.intent</code> (and thus <code>add</code> / <code>render_intent</code> for custom intents) raising <code>ArgumentError (given 0, expected 1+)</code> on Ruby 3.4+. The signature <code>def self.intent(intent_or_comp_args, ...)</code> required a leading positional; Ruby 3.4 completed keyword/positional separation, so a kwargs-only call (e.g. <code>add label: &#39;...&#39;, name: :print, button: {...}</code>) no longer binds the keywords to that positional. Changed to <code>def self.intent(*args, **kwargs)</code>.</p>
74
86
  </li><li>
75
- <p>Make feasibility much faster on index/list pages. The autodetected <code>restrict_with_exception</code> / <code>restrict_with_error</code> destroy preventions ran one existence query per row per dependent association (<code>record.assoc.any?</code>), causing N+1 queries when rendering destroy buttons for a whole page. The <code>List</code> component now batch-precomputes feasibility for the current page via the new <code>Model.precompute_feasibility(records, action)</code>, issuing a single <code>WHERE foreign_key IN (...)</code> existence query per dependent association regardless of row count. Associations that can’t be safely batched (custom <code>prevent</code> blocks, polymorphic/through associations, owner-dependent scopes) transparently fall back to the previous per-record behavior, so results are unchanged - only the query count drops.</p>
87
+ <p>Make feasibility much faster on index/list pages. The autodetected <code>restrict_with_exception</code> / <code>restrict_with_error</code> destroy preventions ran one existence query per row per dependent association (<code>record.assoc.any?</code>), causing N+1 queries when rendering destroy buttons for a whole page. The <code>List</code> component now batch-precomputes feasibility for the current page via the new <code>Model.precompute_feasibility(records, action)</code>, issuing a single <code>WHERE foreign_key IN (...)</code> existence query per dependent association regardless of row count. Associations that can’t be safely batched (custom <code>prevent</code> blocks, polymorphic/through associations, owner-dependent scopes) transparently fall back to the previous per-record behavior, so results are unchanged - only the query count drops.</p>
76
88
  </li></ul>
77
89
 
78
- <h1 id="label-0.11.9">0.11.9</h1>
90
+ <h1 id="0119">0.11.9</h1>
79
91
  <ul><li>
80
- <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>
92
+ <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>
81
93
  </li><li>
82
94
  <p>Enhance documentation for better LLM support (and humans as well of course):</p>
83
95
  </li><li>
@@ -94,43 +106,43 @@
94
106
  <p>(Run <code>yard doc</code> to regenerate the HTML under <code>doc/</code> after doc changes.)</p>
95
107
  </li></ul>
96
108
 
97
- <h1 id="label-0.11.8">0.11.8</h1>
109
+ <h1 id="0118">0.11.8</h1>
98
110
  <ul><li>
99
111
  <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>
100
112
  </li></ul>
101
113
 
102
- <h1 id="label-0.11.7">0.11.7</h1>
114
+ <h1 id="0117">0.11.7</h1>
103
115
  <ul><li>
104
116
  <p>Relax anchormodel dependency, since anchormodel 0.4 is compatible</p>
105
117
  </li></ul>
106
118
 
107
- <h1 id="label-0.11.6">0.11.6</h1>
119
+ <h1 id="0116">0.11.6</h1>
108
120
  <ul><li>
109
121
  <p>Enhance output of component’s <code>inspect</code></p>
110
122
  </li><li>
111
123
  <p>Add request context view helper <code>standalone_name</code></p>
112
124
  </li></ul>
113
125
 
114
- <h1 id="label-0.11.5">0.11.5</h1>
126
+ <h1 id="0115">0.11.5</h1>
115
127
  <ul><li>
116
128
  <p>Replace deprecated <code>:unprocessable_entity</code> by <code>:unprocessable_content</code></p>
117
129
  </li><li>
118
130
  <p>In pre-built <code>:list</code> component, expose more details suitable for showing pagination information</p>
119
131
  </li></ul>
120
132
 
121
- <h1 id="label-0.11.4">0.11.4</h1>
133
+ <h1 id="0114">0.11.4</h1>
122
134
  <ul><li>
123
135
  <p>Internal refactoring of submit button</p>
124
136
  </li><li>
125
137
  <p>Switch to anchormodel 0.3.0</p>
126
138
  </li></ul>
127
139
 
128
- <h1 id="label-0.11.3">0.11.3</h1>
140
+ <h1 id="0113">0.11.3</h1>
129
141
  <ul><li>
130
142
  <p>Enhance error message when attachment reflection is missing</p>
131
143
  </li></ul>
132
144
 
133
- <h1 id="label-0.11.2">0.11.2</h1>
145
+ <h1 id="0112">0.11.2</h1>
134
146
  <ul><li>
135
147
  <p>Harmonize authentication interface for the <code>:new</code> component</p>
136
148
  <ul><li>
@@ -140,7 +152,7 @@
140
152
  </li></ul>
141
153
  </li></ul>
142
154
 
143
- <h1 id="label-0.11.1">0.11.1</h1>
155
+ <h1 id="0111">0.11.1</h1>
144
156
  <ul><li>
145
157
  <p>Fix wrong naming in changelog</p>
146
158
  </li><li>
@@ -152,7 +164,7 @@
152
164
  </li></ul>
153
165
  </li></ul>
154
166
 
155
- <h1 id="label-0.11.0">0.11.0</h1>
167
+ <h1 id="0110">0.11.0</h1>
156
168
  <ul><li>
157
169
  <p>Remove <code>resourceful_sub_comp</code> as the intent API has made it obsolete.</p>
158
170
  </li><li>
@@ -161,24 +173,24 @@
161
173
  <p>Fix a bug in intents preventing overriding the feasibility target</p>
162
174
  </li></ul>
163
175
 
164
- <h2 id="label-Steps+to+take">Steps to take</h2>
176
+ <h2 id="steps-to-take">Steps to take</h2>
165
177
  <ul><li>
166
178
  <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>
167
179
  </li></ul>
168
180
 
169
- <h1 id="label-0.10.2">0.10.2</h1>
181
+ <h1 id="0102">0.10.2</h1>
170
182
  <ul><li>
171
183
  <p>Produce debug output when skipping an intent due to a NameError</p>
172
184
  </li><li>
173
185
  <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>
174
186
  </li></ul>
175
187
 
176
- <h1 id="label-0.10.1">0.10.1</h1>
188
+ <h1 id="0101">0.10.1</h1>
177
189
  <ul><li>
178
190
  <p>Implement intent to always return the path it was initialized with in case the argument was given</p>
179
191
  </li></ul>
180
192
 
181
- <h1 id="label-0.10.0">0.10.0</h1>
193
+ <h1 id="0100">0.10.0</h1>
182
194
  <ul><li>
183
195
  <p>Fix a bug in error message for <code>comp_class_for!</code></p>
184
196
  </li><li>
@@ -202,7 +214,7 @@
202
214
  <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>
203
215
  </li></ul>
204
216
 
205
- <h2 id="label-Steps+to+take">Steps to take</h2>
217
+ <h2 id="steps-to-take-1">Steps to take</h2>
206
218
  <ul><li>
207
219
  <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>
208
220
  </li><li>
@@ -216,7 +228,7 @@
216
228
  </li></ul>
217
229
  </li></ul>
218
230
 
219
- <h1 id="label-0.9.0">0.9.0</h1>
231
+ <h1 id="090">0.9.0</h1>
220
232
  <ul><li>
221
233
  <p>Enhance Intent API:</p>
222
234
  <ul><li>
@@ -226,7 +238,7 @@
226
238
  </li></ul>
227
239
  </li></ul>
228
240
 
229
- <h2 id="label-Steps+to+take">Steps to take</h2>
241
+ <h2 id="steps-to-take-2">Steps to take</h2>
230
242
  <ul><li>
231
243
  <p>Replace code like <code>button: { style: :link }</code> by simply <code>style: :link</code></p>
232
244
  </li><li>
@@ -235,12 +247,12 @@
235
247
  <p>Make sure that all kwargs in intents meant for buttons are wrapped in <code>button: { ... }</code>.</p>
236
248
  </li></ul>
237
249
 
238
- <h1 id="label-0.8.1">0.8.1</h1>
250
+ <h1 id="081">0.8.1</h1>
239
251
  <ul><li>
240
252
  <p>Fix a problem in List resulting in <code>data_class</code> being read too early</p>
241
253
  </li></ul>
242
254
 
243
- <h1 id="label-0.8.0">0.8.0</h1>
255
+ <h1 id="080">0.8.0</h1>
244
256
 
245
257
  <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>
246
258
  <ul><li>
@@ -264,7 +276,7 @@
264
276
  <p>Update documentation</p>
265
277
  </li></ul>
266
278
 
267
- <h2 id="label-Steps+to+take">Steps to take</h2>
279
+ <h2 id="steps-to-take-3">Steps to take</h2>
268
280
  <ul><li>
269
281
  <p>Make sure you no longer use the following methods that have been removed:</p>
270
282
  <ul><li>
@@ -303,14 +315,14 @@
303
315
  <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>
304
316
  </li></ul>
305
317
 
306
- <h1 id="label-0.7.1">0.7.1</h1>
318
+ <h1 id="071">0.7.1</h1>
307
319
  <ul><li>
308
320
  <p>Implement <code>Compony::VirtualModel</code> and document it in the Readme file</p>
309
321
  </li><li>
310
322
  <p>Break up documentation into separate files</p>
311
323
  </li></ul>
312
324
 
313
- <h1 id="label-0.7.0">0.7.0</h1>
325
+ <h1 id="070">0.7.0</h1>
314
326
  <ul><li>
315
327
  <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>
316
328
  </li><li>
@@ -324,72 +336,72 @@
324
336
  </li></ul>
325
337
  </li></ul>
326
338
 
327
- <h2 id="label-Steps+to+take">Steps to take</h2>
339
+ <h2 id="steps-to-take-4">Steps to take</h2>
328
340
  <ul><li>
329
341
  <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>
330
342
  </li></ul>
331
343
 
332
- <h1 id="label-0.6.4">0.6.4</h1>
344
+ <h1 id="064">0.6.4</h1>
333
345
  <ul><li>
334
346
  <p>Replace Feasibility’s error message generation in case of dependent errors by a logic that fits fastgettext’s modern pluralization</p>
335
347
  </li></ul>
336
348
 
337
- <h1 id="label-0.6.3">0.6.3</h1>
349
+ <h1 id="063">0.6.3</h1>
338
350
  <ul><li>
339
351
  <p>Restrict multi-attachments to upload only when the form’s object is a new record</p>
340
352
  </li></ul>
341
353
 
342
- <h1 id="label-0.6.2">0.6.2</h1>
354
+ <h1 id="062">0.6.2</h1>
343
355
  <ul><li>
344
356
  <p>Change download link label of attachments from “Download” to the actual filename</p>
345
357
  </li><li>
346
358
  <p>Support multiple attachments by providing a simple UI for adding and removing attachments</p>
347
359
  </li></ul>
348
360
 
349
- <h1 id="label-0.6.1">0.6.1</h1>
361
+ <h1 id="061">0.6.1</h1>
350
362
  <ul><li>
351
363
  <p>Implement <code>default_sorting</code> in <code>Compony::Components::List</code></p>
352
364
  </li></ul>
353
365
 
354
- <h1 id="label-0.6.0">0.6.0</h1>
366
+ <h1 id="060">0.6.0</h1>
355
367
  <ul><li>
356
368
  <p>Implement <code>Compony::Components::Show</code></p>
357
369
  </li><li>
358
370
  <p>Implement <code>Compony::Components::Index</code> and <code>Compony::Components::List</code></p>
359
371
  </li></ul>
360
372
 
361
- <h1 id="label-0.5.9">0.5.9</h1>
373
+ <h1 id="059">0.5.9</h1>
362
374
  <ul><li>
363
375
  <p>Fix a bug in generator that was introduced with the previous commit</p>
364
376
  </li></ul>
365
377
 
366
- <h1 id="label-0.5.8">0.5.8</h1>
378
+ <h1 id="058">0.5.8</h1>
367
379
  <ul><li>
368
380
  <p>Apply most recent rubocop recommendations</p>
369
381
  </li><li>
370
382
  <p>Update rubocop</p>
371
383
  </li><li>
372
- <h1 id="label-10-3A+Implement+feasibility+framework+for+links">10: Implement feasibility framework for links</h1>
384
+ <p>#10: Implement feasibility framework for links</p>
373
385
  </li><li>
374
386
  <p>Support <code>BaseComponents</code></p>
375
387
  </li></ul>
376
388
 
377
- <h1 id="label-0.5.7">0.5.7</h1>
389
+ <h1 id="057">0.5.7</h1>
378
390
  <ul><li>
379
391
  <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>
380
392
  </li></ul>
381
393
 
382
- <h1 id="label-0.5.6">0.5.6</h1>
394
+ <h1 id="056">0.5.6</h1>
383
395
  <ul><li>
384
396
  <p>Allow overriding the label in the view helper <code>compony_link</code></p>
385
397
  </li></ul>
386
398
 
387
- <h1 id="label-0.5.5">0.5.5</h1>
399
+ <h1 id="055">0.5.5</h1>
388
400
  <ul><li>
389
401
  <p>Support <code>has_one</code> associations for feasibility</p>
390
402
  </li></ul>
391
403
 
392
- <h1 id="label-0.5.4">0.5.4</h1>
404
+ <h1 id="054">0.5.4</h1>
393
405
  <ul><li>
394
406
  <p>Fix a failure description in Form</p>
395
407
  </li><li>
@@ -400,7 +412,7 @@
400
412
  <p>Implement <code>skip_forgery_protection!</code></p>
401
413
  </li></ul>
402
414
 
403
- <h1 id="label-0.5.3">0.5.3</h1>
415
+ <h1 id="053">0.5.3</h1>
404
416
  <ul><li>
405
417
  <p>Support <code>standalone_name</code> in <code>Compony.button</code> and <code>compony_link</code></p>
406
418
  </li><li>
@@ -413,7 +425,7 @@
413
425
  <p>Support <code>disable!</code> and <code>disabled: true</code> in Form, disabling all inputs</p>
414
426
  </li></ul>
415
427
 
416
- <h1 id="label-0.5.2">0.5.2</h1>
428
+ <h1 id="052">0.5.2</h1>
417
429
  <ul><li>
418
430
  <p>Add <code>constraints</code> to <code>standalone</code></p>
419
431
  </li><li>
@@ -422,19 +434,19 @@
422
434
  <p>Set default <code>label_method</code> to <code>label</code> when generating a <code>simple_form</code> input for <code>:association</code></p>
423
435
  </li></ul>
424
436
 
425
- <h1 id="label-0.5.1">0.5.1</h1>
437
+ <h1 id="051">0.5.1</h1>
426
438
  <ul><li>
427
439
  <p>Correctly handle <code>ActiveType::Object</code> virtual fields in Rails 7.2</p>
428
440
  </li></ul>
429
441
 
430
- <h1 id="label-0.5.0">0.5.0</h1>
442
+ <h1 id="050">0.5.0</h1>
431
443
  <ul><li>
432
444
  <p>Require Ruby 3.3.5 and Rails 7.2.1</p>
433
445
  </li><li>
434
446
  <p>Update Gems Compony depends on (this is to ensure all Compony users have versions Compony is frequently tested against)</p>
435
447
  </li></ul>
436
448
 
437
- <h2 id="label-Steps+to+take">Steps to take</h2>
449
+ <h2 id="steps-to-take-5">Steps to take</h2>
438
450
  <ul><li>
439
451
  <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>
440
452
  </li><li>
@@ -457,7 +469,7 @@
457
469
  <p>Check for warnings and react accordingly</p>
458
470
  </li></ul>
459
471
 
460
- <h1 id="label-0.4.1">0.4.1</h1>
472
+ <h1 id="041">0.4.1</h1>
461
473
  <ul><li>
462
474
  <p>Allow the argument <code>standalone_name</code> in button and path helper</p>
463
475
  </li><li>
@@ -470,7 +482,7 @@
470
482
  <p>Fix a bug that caused an override of input option arguments if the <code>accept</code> parameter is present</p>
471
483
  </li></ul>
472
484
 
473
- <h1 id="label-0.4.0">0.4.0</h1>
485
+ <h1 id="040">0.4.0</h1>
474
486
  <ul><li>
475
487
  <p>Support Cancancan’s <code>accessible_attributes</code></p>
476
488
  </li><li>
@@ -494,7 +506,7 @@
494
506
  <p>Require Ruby 3.2.2</p>
495
507
  </li></ul>
496
508
 
497
- <h2 id="label-Steps+to+perform">Steps to perform</h2>
509
+ <h2 id="steps-to-perform">Steps to perform</h2>
498
510
  <ul><li>
499
511
  <p>If using ActiveType, add <code>include ActiveModel::Attributes</code> at the top of your virtual models.</p>
500
512
  </li><li>
@@ -517,19 +529,19 @@
517
529
  <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>
518
530
  </li></ul>
519
531
 
520
- <h1 id="label-0.3.3">0.3.3</h1>
532
+ <h1 id="033">0.3.3</h1>
521
533
  <ul><li>
522
534
  <p>In <code>RequestContext</code>, distinguish between <code>content</code> and <code>content!</code>, where the first allows for missing content blocks.</p>
523
535
  </li></ul>
524
536
 
525
- <h1 id="label-0.3.2">0.3.2</h1>
537
+ <h1 id="032">0.3.2</h1>
526
538
  <ul><li>
527
539
  <p>Add label content block to edit component</p>
528
540
  </li><li>
529
541
  <p>Introduce <code>remove_content!</code> and make its non-bang pendant tolerate missing blocks</p>
530
542
  </li></ul>
531
543
 
532
- <h1 id="label-0.3.1">0.3.1</h1>
544
+ <h1 id="031">0.3.1</h1>
533
545
  <ul><li>
534
546
  <p>In <code>NaturalOrdering</code>, tolerate omitting payload only if it’s an override</p>
535
547
  </li><li>
@@ -542,7 +554,7 @@
542
554
  <p>Implement <code>remove_content</code> which allows removing a previously defined content block (useful for usage in subclasses)</p>
543
555
  </li></ul>
544
556
 
545
- <h1 id="label-0.3.0">0.3.0</h1>
557
+ <h1 id="030">0.3.0</h1>
546
558
  <ul><li>
547
559
  <p>Internals:</p>
548
560
  </li><li>
@@ -567,19 +579,19 @@
567
579
  <p>Implement nesting of content blocks, as described in README.md -&gt; “Nesting content blocks, calling a content block from another”</p>
568
580
  </li></ul>
569
581
 
570
- <h2 id="label-Steps+to+take">Steps to take</h2>
582
+ <h2 id="steps-to-take-6">Steps to take</h2>
571
583
  <ul><li>
572
584
  <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>
573
585
  </li><li>
574
586
  <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>
575
587
  </li></ul>
576
588
 
577
- <h1 id="label-0.2.3">0.2.3</h1>
589
+ <h1 id="023">0.2.3</h1>
578
590
  <ul><li>
579
591
  <p>Support collection of Anchormodels in hidden input</p>
580
592
  </li></ul>
581
593
 
582
- <h1 id="label-0.2.2">0.2.2</h1>
594
+ <h1 id="022">0.2.2</h1>
583
595
  <ul><li>
584
596
  <p>Adjust gemspec</p>
585
597
  </li><li>
@@ -590,7 +602,7 @@
590
602
  <p>Replace custom anchormodel field implementation by Anchormodel’s new implementation of SimpleForm Input</p>
591
603
  </li></ul>
592
604
 
593
- <h1 id="label-0.2.1">0.2.1</h1>
605
+ <h1 id="021">0.2.1</h1>
594
606
  <ul><li>
595
607
  <p>Fix a bug where the app crashed on HEAD verb</p>
596
608
  </li><li>
@@ -602,27 +614,27 @@
602
614
  </li><li>
603
615
  <p>Implement <code>skip_autofocus</code> in Form</p>
604
616
  </li><li>
605
- <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>
617
+ <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>
606
618
  </li></ul>
607
619
 
608
- <h1 id="label-0.2.0">0.2.0</h1>
620
+ <h1 id="020">0.2.0</h1>
609
621
  <ul><li>
610
622
  <p>Cleanup old code</p>
611
623
  </li><li>
612
624
  <p>Remove <code>check_config!</code> that was barely used</p>
613
625
  </li></ul>
614
626
 
615
- <h1 id="label-0.1.1">0.1.1</h1>
627
+ <h1 id="011">0.1.1</h1>
616
628
  <ul><li>
617
629
  <p>Support and force Rails 7.1.2</p>
618
630
  </li></ul>
619
631
 
620
- <h2 id="label-Steps+to+perform">Steps to perform</h2>
632
+ <h2 id="steps-to-perform-1">Steps to perform</h2>
621
633
  <ul><li>
622
- <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>
634
+ <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>
623
635
  </li></ul>
624
636
 
625
- <h1 id="label-0.1.0">0.1.0</h1>
637
+ <h1 id="010">0.1.0</h1>
626
638
  <ul><li>
627
639
  <p>Remove (hopefully) obsolete database safeguard in <code>resolve_association!</code> as we should no longer be accessing the DB.</p>
628
640
  </li><li>
@@ -635,12 +647,12 @@
635
647
  <p>No longer rely on <code>controller.response.body.blank?</code> but use <code>controller.response_body.nil?</code> instead</p>
636
648
  </li></ul>
637
649
 
638
- <h2 id="label-Steps+to+perform">Steps to perform</h2>
650
+ <h2 id="steps-to-perform-2">Steps to perform</h2>
639
651
  <ul><li>
640
652
  <p>Remove any calls to <code>primary_key_type</code></p>
641
653
  </li></ul>
642
654
 
643
- <h1 id="label-0.0.9">0.0.9</h1>
655
+ <h1 id="009">0.0.9</h1>
644
656
 
645
657
  <p>Do not use.</p>
646
658
  <ul><li>
@@ -661,12 +673,12 @@
661
673
  <p>Add new field kind percentage</p>
662
674
  </li></ul>
663
675
 
664
- <h2 id="label-KNOWN+BUGS">KNOWN BUGS</h2>
676
+ <h2 id="known-bugs">KNOWN BUGS</h2>
665
677
  <ul><li>
666
678
  <p>This version breaks polymorphic relations.</p>
667
679
  </li></ul>
668
680
 
669
- <h1 id="label-0.0.8">0.0.8</h1>
681
+ <h1 id="008">0.0.8</h1>
670
682
  <ul><li>
671
683
  <p>Support selecting anchormodel inputs via radio buttons</p>
672
684
  </li><li>
@@ -683,12 +695,12 @@
683
695
  <p>Create new model field type :color</p>
684
696
  </li></ul>
685
697
 
686
- <h1 id="label-0.0.7">0.0.7</h1>
698
+ <h1 id="007">0.0.7</h1>
687
699
  <ul><li>
688
700
  <p>Fix <code>standalone_access_permitted_for?</code> check for buttons pointing to non-get verbs</p>
689
701
  </li></ul>
690
702
 
691
- <h1 id="label-0.0.6">0.0.6</h1>
703
+ <h1 id="006">0.0.6</h1>
692
704
  <ul><li>
693
705
  <p>Fix a bug that breaks hidden fields of type reference</p>
694
706
  </li><li>
@@ -709,7 +721,7 @@
709
721
  <p>In ModelField Anchormodel, tolerate “value” as input_html key and infer correct constant, allow form.object to be missing</p>
710
722
  </li></ul>
711
723
 
712
- <h1 id="label-0.0.5">0.0.5</h1>
724
+ <h1 id="005">0.0.5</h1>
713
725
  <ul><li>
714
726
  <p>Fix row bug for Email field type</p>
715
727
  </li><li>
@@ -726,31 +738,31 @@
726
738
  <p>Support hidden Anchormodel fields</p>
727
739
  </li></ul>
728
740
 
729
- <h2 id="label-KNOWN+BUGS">KNOWN BUGS</h2>
741
+ <h2 id="known-bugs-1">KNOWN BUGS</h2>
730
742
  <ul><li>
731
743
  <p>Breaks hidden fields of type reference</p>
732
744
  </li></ul>
733
745
 
734
- <h1 id="label-0.0.4">0.0.4</h1>
746
+ <h1 id="004">0.0.4</h1>
735
747
  <ul><li>
736
748
  <p>Unscope the namespace of resourceful components</p>
737
749
  </li><li>
738
750
  <p>Add field type :email</p>
739
751
  </li></ul>
740
752
 
741
- <h2 id="label-Steps+to+take">Steps to take</h2>
753
+ <h2 id="steps-to-take-7">Steps to take</h2>
742
754
  <ul><li>
743
755
  <p>When inheriting from components, replace <code>Components::Resourceful::...</code> by <code>Components::...</code></p>
744
756
  </li></ul>
745
757
 
746
- <h1 id="label-0.0.3">0.0.3</h1>
758
+ <h1 id="003">0.0.3</h1>
747
759
  <ul><li>
748
760
  <p>Tolerate nil anchormodels</p>
749
761
  </li><li>
750
762
  <p>Fix a nil pointer bug in namespace management</p>
751
763
  </li></ul>
752
764
 
753
- <h1 id="label-0.0.2">0.0.2</h1>
765
+ <h1 id="002">0.0.2</h1>
754
766
  <ul><li>
755
767
  <p>Add new model field <code>Attachment</code></p>
756
768
  </li><li>
@@ -759,13 +771,13 @@
759
771
  <p>Update <code>Gemfile.lock</code></p>
760
772
  </li></ul>
761
773
 
762
- <h1 id="label-0.0.1">0.0.1</h1>
774
+ <h1 id="001">0.0.1</h1>
763
775
 
764
776
  <p>First version</p>
765
777
  </div></div>
766
778
 
767
779
  <div id="footer">
768
- Generated on Tue Jun 30 22:41:18 2026 by
780
+ Generated on Wed Oct 7 10:48:17 2026 by
769
781
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
770
782
  0.9.34 (ruby-3.4.9).
771
783
  </div>