compony 0.11.12 → 0.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +145 -106
- data/README.md +12 -1
- data/Rakefile +10 -0
- data/TODO.md +2 -1
- data/VERSION +1 -1
- data/compony.gemspec +5 -3
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Buttons/CssButton.html +1 -1
- data/doc/Compony/Components/Buttons/Link.html +1 -1
- data/doc/Compony/Components/Buttons.html +1 -1
- data/doc/Compony/Components/Destroy.html +1 -1
- data/doc/Compony/Components/Edit.html +1 -1
- data/doc/Compony/Components/Form.html +1 -1
- data/doc/Compony/Components/Index.html +1 -1
- data/doc/Compony/Components/List.html +1 -1
- data/doc/Compony/Components/New.html +1 -1
- data/doc/Compony/Components/Show.html +1 -1
- data/doc/Compony/Components/WithForm.html +1 -1
- data/doc/Compony/Components.html +1 -1
- data/doc/Compony/ControllerMixin.html +1 -1
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/Intent.html +1 -1
- data/doc/Compony/ManageIntentsDsl.html +2 -2
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +1 -1
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +8 -2
- data/doc/Compony/ModelFields/Boolean.html +1 -1
- data/doc/Compony/ModelFields/Color.html +1 -1
- data/doc/Compony/ModelFields/Currency.html +1 -1
- data/doc/Compony/ModelFields/Date.html +1 -1
- data/doc/Compony/ModelFields/Datetime.html +1 -1
- data/doc/Compony/ModelFields/Decimal.html +1 -1
- data/doc/Compony/ModelFields/Email.html +1 -1
- data/doc/Compony/ModelFields/Float.html +1 -1
- data/doc/Compony/ModelFields/Integer.html +1 -1
- data/doc/Compony/ModelFields/Percentage.html +1 -1
- data/doc/Compony/ModelFields/Phone.html +1 -1
- data/doc/Compony/ModelFields/RichText.html +1 -1
- data/doc/Compony/ModelFields/String.html +1 -1
- data/doc/Compony/ModelFields/Text.html +1 -1
- data/doc/Compony/ModelFields/Time.html +1 -1
- data/doc/Compony/ModelFields/Url.html +1 -1
- data/doc/Compony/ModelFields.html +1 -1
- data/doc/Compony/ModelMixin.html +1 -1
- data/doc/Compony/NaturalOrdering.html +1 -1
- data/doc/Compony/RequestContext.html +1 -1
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +1 -1
- data/doc/Compony/VirtualModel.html +1 -1
- data/doc/Compony.html +1 -1
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +84 -77
- data/doc/file.README.html +21 -11
- data/doc/file.basic_component.html +14 -14
- data/doc/file.cookbook.html +27 -27
- data/doc/file.destroy.html +2 -2
- data/doc/file.dsl_reference.html +199 -199
- data/doc/file.edit.html +3 -3
- data/doc/file.example.html +13 -13
- data/doc/file.example_advanced.html +10 -10
- data/doc/file.feasibility.html +2 -2
- data/doc/file.form.html +7 -7
- data/doc/file.generators.html +3 -3
- data/doc/file.glossary.html +44 -44
- data/doc/file.gotchas.html +35 -35
- data/doc/file.index.html +10 -10
- data/doc/file.inheritance.html +5 -5
- data/doc/file.installation.html +9 -9
- data/doc/file.integrations.html +46 -46
- data/doc/file.intents.html +11 -11
- data/doc/file.internal_datastructures.html +6 -6
- data/doc/file.list.html +35 -35
- data/doc/file.maintaining.html +21 -21
- data/doc/file.model_fields.html +3 -3
- data/doc/file.nesting.html +5 -5
- data/doc/file.new.html +3 -3
- data/doc/file.ownership.html +2 -2
- data/doc/file.patterns.html +50 -50
- data/doc/file.pre_built_components.html +2 -2
- data/doc/file.resourceful.html +5 -5
- data/doc/file.show.html +17 -17
- data/doc/file.standalone.html +12 -12
- data/doc/file.virtual_models.html +2 -2
- data/doc/file.with_form.html +23 -23
- data/doc/index.html +21 -11
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/model_fields/base.rb +3 -0
- data/spec/README.md +22 -0
- data/spec/compony/component_spec.rb +80 -0
- data/spec/compony/compony_spec.rb +102 -0
- data/spec/compony/intent_spec.rb +94 -0
- data/spec/compony/method_accessible_hash_spec.rb +32 -0
- data/spec/compony/model_fields_spec.rb +70 -0
- data/spec/compony/model_mixin_spec.rb +81 -0
- data/spec/compony/natural_ordering_spec.rb +61 -0
- data/spec/dummy/app/components/statics/home.rb +17 -0
- data/spec/dummy/app/components/statics/secret.rb +15 -0
- data/spec/dummy/app/components/users/destroy.rb +2 -0
- data/spec/dummy/app/components/users/edit.rb +2 -0
- data/spec/dummy/app/components/users/form.rb +14 -0
- data/spec/dummy/app/components/users/index.rb +29 -0
- data/spec/dummy/app/components/users/new.rb +2 -0
- data/spec/dummy/app/components/users/show.rb +26 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/models/ability.rb +7 -0
- data/spec/dummy/app/models/application_record.rb +4 -0
- data/spec/dummy/app/models/user.rb +22 -0
- data/spec/dummy/app/views/layouts/application.html.erb +7 -0
- data/spec/dummy/config/application.rb +20 -0
- data/spec/dummy/config/database.yml +3 -0
- data/spec/dummy/config/environment.rb +3 -0
- data/spec/dummy/config/initializers/simple_form.rb +9 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/schema.rb +14 -0
- data/spec/rails_helper.rb +23 -0
- data/spec/requests/authorization_spec.rb +16 -0
- data/spec/requests/plain_component_spec.rb +9 -0
- data/spec/requests/routing_spec.rb +20 -0
- data/spec/requests/users_crud_spec.rb +99 -0
- metadata +62 -1
data/doc/file.CHANGELOG.html
CHANGED
|
@@ -58,26 +58,33 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
<div id="content"><div id='filecontents'>
|
|
61
|
-
<h1 id="
|
|
61
|
+
<h1 id="01113">0.11.13</h1>
|
|
62
|
+
<ul><li>
|
|
63
|
+
<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>
|
|
64
|
+
</li><li>
|
|
65
|
+
<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>
|
|
66
|
+
</li></ul>
|
|
67
|
+
|
|
68
|
+
<h1 id="01112">0.11.12</h1>
|
|
62
69
|
<ul><li>
|
|
63
70
|
<p>Add Spanish (<code>es</code>) translations.</p>
|
|
64
71
|
</li></ul>
|
|
65
72
|
|
|
66
|
-
<h1 id="
|
|
73
|
+
<h1 id="01111">0.11.11</h1>
|
|
67
74
|
<ul><li>
|
|
68
|
-
<p>Fix the <code>New</code> component’s <code>method: :post</code> intent button (immediate create, no form) being hidden for
|
|
75
|
+
<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
76
|
</li></ul>
|
|
70
77
|
|
|
71
|
-
<h1 id="
|
|
78
|
+
<h1 id="01110">0.11.10</h1>
|
|
72
79
|
<ul><li>
|
|
73
80
|
<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: '...', name: :print, button: {...}</code>) no longer binds the keywords to that positional. Changed to <code>def self.intent(*args, **kwargs)</code>.</p>
|
|
74
81
|
</li><li>
|
|
75
|
-
<p>Make feasibility much faster on index/list pages. The autodetected <code>restrict_with_exception</code> /
|
|
82
|
+
<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
83
|
</li></ul>
|
|
77
84
|
|
|
78
|
-
<h1 id="
|
|
85
|
+
<h1 id="0119">0.11.9</h1>
|
|
79
86
|
<ul><li>
|
|
80
|
-
<p>Fix <code>standalone</code> overrides clobbering inherited <code>layout</code> / <code>skip_authentication</code> /
|
|
87
|
+
<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
88
|
</li><li>
|
|
82
89
|
<p>Enhance documentation for better LLM support (and humans as well of course):</p>
|
|
83
90
|
</li><li>
|
|
@@ -94,43 +101,43 @@
|
|
|
94
101
|
<p>(Run <code>yard doc</code> to regenerate the HTML under <code>doc/</code> after doc changes.)</p>
|
|
95
102
|
</li></ul>
|
|
96
103
|
|
|
97
|
-
<h1 id="
|
|
104
|
+
<h1 id="0118">0.11.8</h1>
|
|
98
105
|
<ul><li>
|
|
99
106
|
<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
107
|
</li></ul>
|
|
101
108
|
|
|
102
|
-
<h1 id="
|
|
109
|
+
<h1 id="0117">0.11.7</h1>
|
|
103
110
|
<ul><li>
|
|
104
111
|
<p>Relax anchormodel dependency, since anchormodel 0.4 is compatible</p>
|
|
105
112
|
</li></ul>
|
|
106
113
|
|
|
107
|
-
<h1 id="
|
|
114
|
+
<h1 id="0116">0.11.6</h1>
|
|
108
115
|
<ul><li>
|
|
109
116
|
<p>Enhance output of component’s <code>inspect</code></p>
|
|
110
117
|
</li><li>
|
|
111
118
|
<p>Add request context view helper <code>standalone_name</code></p>
|
|
112
119
|
</li></ul>
|
|
113
120
|
|
|
114
|
-
<h1 id="
|
|
121
|
+
<h1 id="0115">0.11.5</h1>
|
|
115
122
|
<ul><li>
|
|
116
123
|
<p>Replace deprecated <code>:unprocessable_entity</code> by <code>:unprocessable_content</code></p>
|
|
117
124
|
</li><li>
|
|
118
125
|
<p>In pre-built <code>:list</code> component, expose more details suitable for showing pagination information</p>
|
|
119
126
|
</li></ul>
|
|
120
127
|
|
|
121
|
-
<h1 id="
|
|
128
|
+
<h1 id="0114">0.11.4</h1>
|
|
122
129
|
<ul><li>
|
|
123
130
|
<p>Internal refactoring of submit button</p>
|
|
124
131
|
</li><li>
|
|
125
132
|
<p>Switch to anchormodel 0.3.0</p>
|
|
126
133
|
</li></ul>
|
|
127
134
|
|
|
128
|
-
<h1 id="
|
|
135
|
+
<h1 id="0113">0.11.3</h1>
|
|
129
136
|
<ul><li>
|
|
130
137
|
<p>Enhance error message when attachment reflection is missing</p>
|
|
131
138
|
</li></ul>
|
|
132
139
|
|
|
133
|
-
<h1 id="
|
|
140
|
+
<h1 id="0112">0.11.2</h1>
|
|
134
141
|
<ul><li>
|
|
135
142
|
<p>Harmonize authentication interface for the <code>:new</code> component</p>
|
|
136
143
|
<ul><li>
|
|
@@ -140,7 +147,7 @@
|
|
|
140
147
|
</li></ul>
|
|
141
148
|
</li></ul>
|
|
142
149
|
|
|
143
|
-
<h1 id="
|
|
150
|
+
<h1 id="0111">0.11.1</h1>
|
|
144
151
|
<ul><li>
|
|
145
152
|
<p>Fix wrong naming in changelog</p>
|
|
146
153
|
</li><li>
|
|
@@ -152,7 +159,7 @@
|
|
|
152
159
|
</li></ul>
|
|
153
160
|
</li></ul>
|
|
154
161
|
|
|
155
|
-
<h1 id="
|
|
162
|
+
<h1 id="0110">0.11.0</h1>
|
|
156
163
|
<ul><li>
|
|
157
164
|
<p>Remove <code>resourceful_sub_comp</code> as the intent API has made it obsolete.</p>
|
|
158
165
|
</li><li>
|
|
@@ -161,24 +168,24 @@
|
|
|
161
168
|
<p>Fix a bug in intents preventing overriding the feasibility target</p>
|
|
162
169
|
</li></ul>
|
|
163
170
|
|
|
164
|
-
<h2 id="
|
|
171
|
+
<h2 id="steps-to-take">Steps to take</h2>
|
|
165
172
|
<ul><li>
|
|
166
173
|
<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
174
|
</li></ul>
|
|
168
175
|
|
|
169
|
-
<h1 id="
|
|
176
|
+
<h1 id="0102">0.10.2</h1>
|
|
170
177
|
<ul><li>
|
|
171
178
|
<p>Produce debug output when skipping an intent due to a NameError</p>
|
|
172
179
|
</li><li>
|
|
173
180
|
<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
181
|
</li></ul>
|
|
175
182
|
|
|
176
|
-
<h1 id="
|
|
183
|
+
<h1 id="0101">0.10.1</h1>
|
|
177
184
|
<ul><li>
|
|
178
185
|
<p>Implement intent to always return the path it was initialized with in case the argument was given</p>
|
|
179
186
|
</li></ul>
|
|
180
187
|
|
|
181
|
-
<h1 id="
|
|
188
|
+
<h1 id="0100">0.10.0</h1>
|
|
182
189
|
<ul><li>
|
|
183
190
|
<p>Fix a bug in error message for <code>comp_class_for!</code></p>
|
|
184
191
|
</li><li>
|
|
@@ -202,7 +209,7 @@
|
|
|
202
209
|
<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
210
|
</li></ul>
|
|
204
211
|
|
|
205
|
-
<h2 id="
|
|
212
|
+
<h2 id="steps-to-take-1">Steps to take</h2>
|
|
206
213
|
<ul><li>
|
|
207
214
|
<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
215
|
</li><li>
|
|
@@ -216,7 +223,7 @@
|
|
|
216
223
|
</li></ul>
|
|
217
224
|
</li></ul>
|
|
218
225
|
|
|
219
|
-
<h1 id="
|
|
226
|
+
<h1 id="090">0.9.0</h1>
|
|
220
227
|
<ul><li>
|
|
221
228
|
<p>Enhance Intent API:</p>
|
|
222
229
|
<ul><li>
|
|
@@ -226,7 +233,7 @@
|
|
|
226
233
|
</li></ul>
|
|
227
234
|
</li></ul>
|
|
228
235
|
|
|
229
|
-
<h2 id="
|
|
236
|
+
<h2 id="steps-to-take-2">Steps to take</h2>
|
|
230
237
|
<ul><li>
|
|
231
238
|
<p>Replace code like <code>button: { style: :link }</code> by simply <code>style: :link</code></p>
|
|
232
239
|
</li><li>
|
|
@@ -235,12 +242,12 @@
|
|
|
235
242
|
<p>Make sure that all kwargs in intents meant for buttons are wrapped in <code>button: { ... }</code>.</p>
|
|
236
243
|
</li></ul>
|
|
237
244
|
|
|
238
|
-
<h1 id="
|
|
245
|
+
<h1 id="081">0.8.1</h1>
|
|
239
246
|
<ul><li>
|
|
240
247
|
<p>Fix a problem in List resulting in <code>data_class</code> being read too early</p>
|
|
241
248
|
</li></ul>
|
|
242
249
|
|
|
243
|
-
<h1 id="
|
|
250
|
+
<h1 id="080">0.8.0</h1>
|
|
244
251
|
|
|
245
252
|
<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
253
|
<ul><li>
|
|
@@ -264,7 +271,7 @@
|
|
|
264
271
|
<p>Update documentation</p>
|
|
265
272
|
</li></ul>
|
|
266
273
|
|
|
267
|
-
<h2 id="
|
|
274
|
+
<h2 id="steps-to-take-3">Steps to take</h2>
|
|
268
275
|
<ul><li>
|
|
269
276
|
<p>Make sure you no longer use the following methods that have been removed:</p>
|
|
270
277
|
<ul><li>
|
|
@@ -303,14 +310,14 @@
|
|
|
303
310
|
<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
311
|
</li></ul>
|
|
305
312
|
|
|
306
|
-
<h1 id="
|
|
313
|
+
<h1 id="071">0.7.1</h1>
|
|
307
314
|
<ul><li>
|
|
308
315
|
<p>Implement <code>Compony::VirtualModel</code> and document it in the Readme file</p>
|
|
309
316
|
</li><li>
|
|
310
317
|
<p>Break up documentation into separate files</p>
|
|
311
318
|
</li></ul>
|
|
312
319
|
|
|
313
|
-
<h1 id="
|
|
320
|
+
<h1 id="070">0.7.0</h1>
|
|
314
321
|
<ul><li>
|
|
315
322
|
<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
323
|
</li><li>
|
|
@@ -324,72 +331,72 @@
|
|
|
324
331
|
</li></ul>
|
|
325
332
|
</li></ul>
|
|
326
333
|
|
|
327
|
-
<h2 id="
|
|
334
|
+
<h2 id="steps-to-take-4">Steps to take</h2>
|
|
328
335
|
<ul><li>
|
|
329
336
|
<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
337
|
</li></ul>
|
|
331
338
|
|
|
332
|
-
<h1 id="
|
|
339
|
+
<h1 id="064">0.6.4</h1>
|
|
333
340
|
<ul><li>
|
|
334
341
|
<p>Replace Feasibility’s error message generation in case of dependent errors by a logic that fits fastgettext’s modern pluralization</p>
|
|
335
342
|
</li></ul>
|
|
336
343
|
|
|
337
|
-
<h1 id="
|
|
344
|
+
<h1 id="063">0.6.3</h1>
|
|
338
345
|
<ul><li>
|
|
339
346
|
<p>Restrict multi-attachments to upload only when the form’s object is a new record</p>
|
|
340
347
|
</li></ul>
|
|
341
348
|
|
|
342
|
-
<h1 id="
|
|
349
|
+
<h1 id="062">0.6.2</h1>
|
|
343
350
|
<ul><li>
|
|
344
351
|
<p>Change download link label of attachments from “Download” to the actual filename</p>
|
|
345
352
|
</li><li>
|
|
346
353
|
<p>Support multiple attachments by providing a simple UI for adding and removing attachments</p>
|
|
347
354
|
</li></ul>
|
|
348
355
|
|
|
349
|
-
<h1 id="
|
|
356
|
+
<h1 id="061">0.6.1</h1>
|
|
350
357
|
<ul><li>
|
|
351
358
|
<p>Implement <code>default_sorting</code> in <code>Compony::Components::List</code></p>
|
|
352
359
|
</li></ul>
|
|
353
360
|
|
|
354
|
-
<h1 id="
|
|
361
|
+
<h1 id="060">0.6.0</h1>
|
|
355
362
|
<ul><li>
|
|
356
363
|
<p>Implement <code>Compony::Components::Show</code></p>
|
|
357
364
|
</li><li>
|
|
358
365
|
<p>Implement <code>Compony::Components::Index</code> and <code>Compony::Components::List</code></p>
|
|
359
366
|
</li></ul>
|
|
360
367
|
|
|
361
|
-
<h1 id="
|
|
368
|
+
<h1 id="059">0.5.9</h1>
|
|
362
369
|
<ul><li>
|
|
363
370
|
<p>Fix a bug in generator that was introduced with the previous commit</p>
|
|
364
371
|
</li></ul>
|
|
365
372
|
|
|
366
|
-
<h1 id="
|
|
373
|
+
<h1 id="058">0.5.8</h1>
|
|
367
374
|
<ul><li>
|
|
368
375
|
<p>Apply most recent rubocop recommendations</p>
|
|
369
376
|
</li><li>
|
|
370
377
|
<p>Update rubocop</p>
|
|
371
378
|
</li><li>
|
|
372
|
-
<
|
|
379
|
+
<p>#10: Implement feasibility framework for links</p>
|
|
373
380
|
</li><li>
|
|
374
381
|
<p>Support <code>BaseComponents</code></p>
|
|
375
382
|
</li></ul>
|
|
376
383
|
|
|
377
|
-
<h1 id="
|
|
384
|
+
<h1 id="057">0.5.7</h1>
|
|
378
385
|
<ul><li>
|
|
379
386
|
<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
387
|
</li></ul>
|
|
381
388
|
|
|
382
|
-
<h1 id="
|
|
389
|
+
<h1 id="056">0.5.6</h1>
|
|
383
390
|
<ul><li>
|
|
384
391
|
<p>Allow overriding the label in the view helper <code>compony_link</code></p>
|
|
385
392
|
</li></ul>
|
|
386
393
|
|
|
387
|
-
<h1 id="
|
|
394
|
+
<h1 id="055">0.5.5</h1>
|
|
388
395
|
<ul><li>
|
|
389
396
|
<p>Support <code>has_one</code> associations for feasibility</p>
|
|
390
397
|
</li></ul>
|
|
391
398
|
|
|
392
|
-
<h1 id="
|
|
399
|
+
<h1 id="054">0.5.4</h1>
|
|
393
400
|
<ul><li>
|
|
394
401
|
<p>Fix a failure description in Form</p>
|
|
395
402
|
</li><li>
|
|
@@ -400,7 +407,7 @@
|
|
|
400
407
|
<p>Implement <code>skip_forgery_protection!</code></p>
|
|
401
408
|
</li></ul>
|
|
402
409
|
|
|
403
|
-
<h1 id="
|
|
410
|
+
<h1 id="053">0.5.3</h1>
|
|
404
411
|
<ul><li>
|
|
405
412
|
<p>Support <code>standalone_name</code> in <code>Compony.button</code> and <code>compony_link</code></p>
|
|
406
413
|
</li><li>
|
|
@@ -413,7 +420,7 @@
|
|
|
413
420
|
<p>Support <code>disable!</code> and <code>disabled: true</code> in Form, disabling all inputs</p>
|
|
414
421
|
</li></ul>
|
|
415
422
|
|
|
416
|
-
<h1 id="
|
|
423
|
+
<h1 id="052">0.5.2</h1>
|
|
417
424
|
<ul><li>
|
|
418
425
|
<p>Add <code>constraints</code> to <code>standalone</code></p>
|
|
419
426
|
</li><li>
|
|
@@ -422,19 +429,19 @@
|
|
|
422
429
|
<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
430
|
</li></ul>
|
|
424
431
|
|
|
425
|
-
<h1 id="
|
|
432
|
+
<h1 id="051">0.5.1</h1>
|
|
426
433
|
<ul><li>
|
|
427
434
|
<p>Correctly handle <code>ActiveType::Object</code> virtual fields in Rails 7.2</p>
|
|
428
435
|
</li></ul>
|
|
429
436
|
|
|
430
|
-
<h1 id="
|
|
437
|
+
<h1 id="050">0.5.0</h1>
|
|
431
438
|
<ul><li>
|
|
432
439
|
<p>Require Ruby 3.3.5 and Rails 7.2.1</p>
|
|
433
440
|
</li><li>
|
|
434
441
|
<p>Update Gems Compony depends on (this is to ensure all Compony users have versions Compony is frequently tested against)</p>
|
|
435
442
|
</li></ul>
|
|
436
443
|
|
|
437
|
-
<h2 id="
|
|
444
|
+
<h2 id="steps-to-take-5">Steps to take</h2>
|
|
438
445
|
<ul><li>
|
|
439
446
|
<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
447
|
</li><li>
|
|
@@ -457,7 +464,7 @@
|
|
|
457
464
|
<p>Check for warnings and react accordingly</p>
|
|
458
465
|
</li></ul>
|
|
459
466
|
|
|
460
|
-
<h1 id="
|
|
467
|
+
<h1 id="041">0.4.1</h1>
|
|
461
468
|
<ul><li>
|
|
462
469
|
<p>Allow the argument <code>standalone_name</code> in button and path helper</p>
|
|
463
470
|
</li><li>
|
|
@@ -470,7 +477,7 @@
|
|
|
470
477
|
<p>Fix a bug that caused an override of input option arguments if the <code>accept</code> parameter is present</p>
|
|
471
478
|
</li></ul>
|
|
472
479
|
|
|
473
|
-
<h1 id="
|
|
480
|
+
<h1 id="040">0.4.0</h1>
|
|
474
481
|
<ul><li>
|
|
475
482
|
<p>Support Cancancan’s <code>accessible_attributes</code></p>
|
|
476
483
|
</li><li>
|
|
@@ -494,7 +501,7 @@
|
|
|
494
501
|
<p>Require Ruby 3.2.2</p>
|
|
495
502
|
</li></ul>
|
|
496
503
|
|
|
497
|
-
<h2 id="
|
|
504
|
+
<h2 id="steps-to-perform">Steps to perform</h2>
|
|
498
505
|
<ul><li>
|
|
499
506
|
<p>If using ActiveType, add <code>include ActiveModel::Attributes</code> at the top of your virtual models.</p>
|
|
500
507
|
</li><li>
|
|
@@ -517,19 +524,19 @@
|
|
|
517
524
|
<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
525
|
</li></ul>
|
|
519
526
|
|
|
520
|
-
<h1 id="
|
|
527
|
+
<h1 id="033">0.3.3</h1>
|
|
521
528
|
<ul><li>
|
|
522
529
|
<p>In <code>RequestContext</code>, distinguish between <code>content</code> and <code>content!</code>, where the first allows for missing content blocks.</p>
|
|
523
530
|
</li></ul>
|
|
524
531
|
|
|
525
|
-
<h1 id="
|
|
532
|
+
<h1 id="032">0.3.2</h1>
|
|
526
533
|
<ul><li>
|
|
527
534
|
<p>Add label content block to edit component</p>
|
|
528
535
|
</li><li>
|
|
529
536
|
<p>Introduce <code>remove_content!</code> and make its non-bang pendant tolerate missing blocks</p>
|
|
530
537
|
</li></ul>
|
|
531
538
|
|
|
532
|
-
<h1 id="
|
|
539
|
+
<h1 id="031">0.3.1</h1>
|
|
533
540
|
<ul><li>
|
|
534
541
|
<p>In <code>NaturalOrdering</code>, tolerate omitting payload only if it’s an override</p>
|
|
535
542
|
</li><li>
|
|
@@ -542,7 +549,7 @@
|
|
|
542
549
|
<p>Implement <code>remove_content</code> which allows removing a previously defined content block (useful for usage in subclasses)</p>
|
|
543
550
|
</li></ul>
|
|
544
551
|
|
|
545
|
-
<h1 id="
|
|
552
|
+
<h1 id="030">0.3.0</h1>
|
|
546
553
|
<ul><li>
|
|
547
554
|
<p>Internals:</p>
|
|
548
555
|
</li><li>
|
|
@@ -567,19 +574,19 @@
|
|
|
567
574
|
<p>Implement nesting of content blocks, as described in README.md -> “Nesting content blocks, calling a content block from another”</p>
|
|
568
575
|
</li></ul>
|
|
569
576
|
|
|
570
|
-
<h2 id="
|
|
577
|
+
<h2 id="steps-to-take-6">Steps to take</h2>
|
|
571
578
|
<ul><li>
|
|
572
579
|
<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
580
|
</li><li>
|
|
574
581
|
<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
582
|
</li></ul>
|
|
576
583
|
|
|
577
|
-
<h1 id="
|
|
584
|
+
<h1 id="023">0.2.3</h1>
|
|
578
585
|
<ul><li>
|
|
579
586
|
<p>Support collection of Anchormodels in hidden input</p>
|
|
580
587
|
</li></ul>
|
|
581
588
|
|
|
582
|
-
<h1 id="
|
|
589
|
+
<h1 id="022">0.2.2</h1>
|
|
583
590
|
<ul><li>
|
|
584
591
|
<p>Adjust gemspec</p>
|
|
585
592
|
</li><li>
|
|
@@ -590,7 +597,7 @@
|
|
|
590
597
|
<p>Replace custom anchormodel field implementation by Anchormodel’s new implementation of SimpleForm Input</p>
|
|
591
598
|
</li></ul>
|
|
592
599
|
|
|
593
|
-
<h1 id="
|
|
600
|
+
<h1 id="021">0.2.1</h1>
|
|
594
601
|
<ul><li>
|
|
595
602
|
<p>Fix a bug where the app crashed on HEAD verb</p>
|
|
596
603
|
</li><li>
|
|
@@ -602,27 +609,27 @@
|
|
|
602
609
|
</li><li>
|
|
603
610
|
<p>Implement <code>skip_autofocus</code> in Form</p>
|
|
604
611
|
</li><li>
|
|
605
|
-
<p>Allow partial override of standalone verb configs. Example:
|
|
612
|
+
<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
613
|
</li></ul>
|
|
607
614
|
|
|
608
|
-
<h1 id="
|
|
615
|
+
<h1 id="020">0.2.0</h1>
|
|
609
616
|
<ul><li>
|
|
610
617
|
<p>Cleanup old code</p>
|
|
611
618
|
</li><li>
|
|
612
619
|
<p>Remove <code>check_config!</code> that was barely used</p>
|
|
613
620
|
</li></ul>
|
|
614
621
|
|
|
615
|
-
<h1 id="
|
|
622
|
+
<h1 id="011">0.1.1</h1>
|
|
616
623
|
<ul><li>
|
|
617
624
|
<p>Support and force Rails 7.1.2</p>
|
|
618
625
|
</li></ul>
|
|
619
626
|
|
|
620
|
-
<h2 id="
|
|
627
|
+
<h2 id="steps-to-perform-1">Steps to perform</h2>
|
|
621
628
|
<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:
|
|
629
|
+
<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
630
|
</li></ul>
|
|
624
631
|
|
|
625
|
-
<h1 id="
|
|
632
|
+
<h1 id="010">0.1.0</h1>
|
|
626
633
|
<ul><li>
|
|
627
634
|
<p>Remove (hopefully) obsolete database safeguard in <code>resolve_association!</code> as we should no longer be accessing the DB.</p>
|
|
628
635
|
</li><li>
|
|
@@ -635,12 +642,12 @@
|
|
|
635
642
|
<p>No longer rely on <code>controller.response.body.blank?</code> but use <code>controller.response_body.nil?</code> instead</p>
|
|
636
643
|
</li></ul>
|
|
637
644
|
|
|
638
|
-
<h2 id="
|
|
645
|
+
<h2 id="steps-to-perform-2">Steps to perform</h2>
|
|
639
646
|
<ul><li>
|
|
640
647
|
<p>Remove any calls to <code>primary_key_type</code></p>
|
|
641
648
|
</li></ul>
|
|
642
649
|
|
|
643
|
-
<h1 id="
|
|
650
|
+
<h1 id="009">0.0.9</h1>
|
|
644
651
|
|
|
645
652
|
<p>Do not use.</p>
|
|
646
653
|
<ul><li>
|
|
@@ -661,12 +668,12 @@
|
|
|
661
668
|
<p>Add new field kind percentage</p>
|
|
662
669
|
</li></ul>
|
|
663
670
|
|
|
664
|
-
<h2 id="
|
|
671
|
+
<h2 id="known-bugs">KNOWN BUGS</h2>
|
|
665
672
|
<ul><li>
|
|
666
673
|
<p>This version breaks polymorphic relations.</p>
|
|
667
674
|
</li></ul>
|
|
668
675
|
|
|
669
|
-
<h1 id="
|
|
676
|
+
<h1 id="008">0.0.8</h1>
|
|
670
677
|
<ul><li>
|
|
671
678
|
<p>Support selecting anchormodel inputs via radio buttons</p>
|
|
672
679
|
</li><li>
|
|
@@ -683,12 +690,12 @@
|
|
|
683
690
|
<p>Create new model field type :color</p>
|
|
684
691
|
</li></ul>
|
|
685
692
|
|
|
686
|
-
<h1 id="
|
|
693
|
+
<h1 id="007">0.0.7</h1>
|
|
687
694
|
<ul><li>
|
|
688
695
|
<p>Fix <code>standalone_access_permitted_for?</code> check for buttons pointing to non-get verbs</p>
|
|
689
696
|
</li></ul>
|
|
690
697
|
|
|
691
|
-
<h1 id="
|
|
698
|
+
<h1 id="006">0.0.6</h1>
|
|
692
699
|
<ul><li>
|
|
693
700
|
<p>Fix a bug that breaks hidden fields of type reference</p>
|
|
694
701
|
</li><li>
|
|
@@ -709,7 +716,7 @@
|
|
|
709
716
|
<p>In ModelField Anchormodel, tolerate “value” as input_html key and infer correct constant, allow form.object to be missing</p>
|
|
710
717
|
</li></ul>
|
|
711
718
|
|
|
712
|
-
<h1 id="
|
|
719
|
+
<h1 id="005">0.0.5</h1>
|
|
713
720
|
<ul><li>
|
|
714
721
|
<p>Fix row bug for Email field type</p>
|
|
715
722
|
</li><li>
|
|
@@ -726,31 +733,31 @@
|
|
|
726
733
|
<p>Support hidden Anchormodel fields</p>
|
|
727
734
|
</li></ul>
|
|
728
735
|
|
|
729
|
-
<h2 id="
|
|
736
|
+
<h2 id="known-bugs-1">KNOWN BUGS</h2>
|
|
730
737
|
<ul><li>
|
|
731
738
|
<p>Breaks hidden fields of type reference</p>
|
|
732
739
|
</li></ul>
|
|
733
740
|
|
|
734
|
-
<h1 id="
|
|
741
|
+
<h1 id="004">0.0.4</h1>
|
|
735
742
|
<ul><li>
|
|
736
743
|
<p>Unscope the namespace of resourceful components</p>
|
|
737
744
|
</li><li>
|
|
738
745
|
<p>Add field type :email</p>
|
|
739
746
|
</li></ul>
|
|
740
747
|
|
|
741
|
-
<h2 id="
|
|
748
|
+
<h2 id="steps-to-take-7">Steps to take</h2>
|
|
742
749
|
<ul><li>
|
|
743
750
|
<p>When inheriting from components, replace <code>Components::Resourceful::...</code> by <code>Components::...</code></p>
|
|
744
751
|
</li></ul>
|
|
745
752
|
|
|
746
|
-
<h1 id="
|
|
753
|
+
<h1 id="003">0.0.3</h1>
|
|
747
754
|
<ul><li>
|
|
748
755
|
<p>Tolerate nil anchormodels</p>
|
|
749
756
|
</li><li>
|
|
750
757
|
<p>Fix a nil pointer bug in namespace management</p>
|
|
751
758
|
</li></ul>
|
|
752
759
|
|
|
753
|
-
<h1 id="
|
|
760
|
+
<h1 id="002">0.0.2</h1>
|
|
754
761
|
<ul><li>
|
|
755
762
|
<p>Add new model field <code>Attachment</code></p>
|
|
756
763
|
</li><li>
|
|
@@ -759,13 +766,13 @@
|
|
|
759
766
|
<p>Update <code>Gemfile.lock</code></p>
|
|
760
767
|
</li></ul>
|
|
761
768
|
|
|
762
|
-
<h1 id="
|
|
769
|
+
<h1 id="001">0.0.1</h1>
|
|
763
770
|
|
|
764
771
|
<p>First version</p>
|
|
765
772
|
</div></div>
|
|
766
773
|
|
|
767
774
|
<div id="footer">
|
|
768
|
-
Generated on Tue
|
|
775
|
+
Generated on Tue Aug 18 14:36:33 2026 by
|
|
769
776
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
770
777
|
0.9.34 (ruby-3.4.9).
|
|
771
778
|
</div>
|