compony 0.11.11 → 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 +13 -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/config/locales/es.yml +46 -0
- 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 +88 -76
- 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 +63 -1
data/doc/file.CHANGELOG.html
CHANGED
|
@@ -58,21 +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
62
|
<ul><li>
|
|
63
|
-
<p>Fix
|
|
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>
|
|
69
|
+
<ul><li>
|
|
70
|
+
<p>Add Spanish (<code>es</code>) translations.</p>
|
|
71
|
+
</li></ul>
|
|
72
|
+
|
|
73
|
+
<h1 id="01111">0.11.11</h1>
|
|
74
|
+
<ul><li>
|
|
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>
|
|
64
76
|
</li></ul>
|
|
65
77
|
|
|
66
|
-
<h1 id="
|
|
78
|
+
<h1 id="01110">0.11.10</h1>
|
|
67
79
|
<ul><li>
|
|
68
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>
|
|
69
81
|
</li><li>
|
|
70
|
-
<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>
|
|
71
83
|
</li></ul>
|
|
72
84
|
|
|
73
|
-
<h1 id="
|
|
85
|
+
<h1 id="0119">0.11.9</h1>
|
|
74
86
|
<ul><li>
|
|
75
|
-
<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>
|
|
76
88
|
</li><li>
|
|
77
89
|
<p>Enhance documentation for better LLM support (and humans as well of course):</p>
|
|
78
90
|
</li><li>
|
|
@@ -89,43 +101,43 @@
|
|
|
89
101
|
<p>(Run <code>yard doc</code> to regenerate the HTML under <code>doc/</code> after doc changes.)</p>
|
|
90
102
|
</li></ul>
|
|
91
103
|
|
|
92
|
-
<h1 id="
|
|
104
|
+
<h1 id="0118">0.11.8</h1>
|
|
93
105
|
<ul><li>
|
|
94
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>
|
|
95
107
|
</li></ul>
|
|
96
108
|
|
|
97
|
-
<h1 id="
|
|
109
|
+
<h1 id="0117">0.11.7</h1>
|
|
98
110
|
<ul><li>
|
|
99
111
|
<p>Relax anchormodel dependency, since anchormodel 0.4 is compatible</p>
|
|
100
112
|
</li></ul>
|
|
101
113
|
|
|
102
|
-
<h1 id="
|
|
114
|
+
<h1 id="0116">0.11.6</h1>
|
|
103
115
|
<ul><li>
|
|
104
116
|
<p>Enhance output of component’s <code>inspect</code></p>
|
|
105
117
|
</li><li>
|
|
106
118
|
<p>Add request context view helper <code>standalone_name</code></p>
|
|
107
119
|
</li></ul>
|
|
108
120
|
|
|
109
|
-
<h1 id="
|
|
121
|
+
<h1 id="0115">0.11.5</h1>
|
|
110
122
|
<ul><li>
|
|
111
123
|
<p>Replace deprecated <code>:unprocessable_entity</code> by <code>:unprocessable_content</code></p>
|
|
112
124
|
</li><li>
|
|
113
125
|
<p>In pre-built <code>:list</code> component, expose more details suitable for showing pagination information</p>
|
|
114
126
|
</li></ul>
|
|
115
127
|
|
|
116
|
-
<h1 id="
|
|
128
|
+
<h1 id="0114">0.11.4</h1>
|
|
117
129
|
<ul><li>
|
|
118
130
|
<p>Internal refactoring of submit button</p>
|
|
119
131
|
</li><li>
|
|
120
132
|
<p>Switch to anchormodel 0.3.0</p>
|
|
121
133
|
</li></ul>
|
|
122
134
|
|
|
123
|
-
<h1 id="
|
|
135
|
+
<h1 id="0113">0.11.3</h1>
|
|
124
136
|
<ul><li>
|
|
125
137
|
<p>Enhance error message when attachment reflection is missing</p>
|
|
126
138
|
</li></ul>
|
|
127
139
|
|
|
128
|
-
<h1 id="
|
|
140
|
+
<h1 id="0112">0.11.2</h1>
|
|
129
141
|
<ul><li>
|
|
130
142
|
<p>Harmonize authentication interface for the <code>:new</code> component</p>
|
|
131
143
|
<ul><li>
|
|
@@ -135,7 +147,7 @@
|
|
|
135
147
|
</li></ul>
|
|
136
148
|
</li></ul>
|
|
137
149
|
|
|
138
|
-
<h1 id="
|
|
150
|
+
<h1 id="0111">0.11.1</h1>
|
|
139
151
|
<ul><li>
|
|
140
152
|
<p>Fix wrong naming in changelog</p>
|
|
141
153
|
</li><li>
|
|
@@ -147,7 +159,7 @@
|
|
|
147
159
|
</li></ul>
|
|
148
160
|
</li></ul>
|
|
149
161
|
|
|
150
|
-
<h1 id="
|
|
162
|
+
<h1 id="0110">0.11.0</h1>
|
|
151
163
|
<ul><li>
|
|
152
164
|
<p>Remove <code>resourceful_sub_comp</code> as the intent API has made it obsolete.</p>
|
|
153
165
|
</li><li>
|
|
@@ -156,24 +168,24 @@
|
|
|
156
168
|
<p>Fix a bug in intents preventing overriding the feasibility target</p>
|
|
157
169
|
</li></ul>
|
|
158
170
|
|
|
159
|
-
<h2 id="
|
|
171
|
+
<h2 id="steps-to-take">Steps to take</h2>
|
|
160
172
|
<ul><li>
|
|
161
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>
|
|
162
174
|
</li></ul>
|
|
163
175
|
|
|
164
|
-
<h1 id="
|
|
176
|
+
<h1 id="0102">0.10.2</h1>
|
|
165
177
|
<ul><li>
|
|
166
178
|
<p>Produce debug output when skipping an intent due to a NameError</p>
|
|
167
179
|
</li><li>
|
|
168
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>
|
|
169
181
|
</li></ul>
|
|
170
182
|
|
|
171
|
-
<h1 id="
|
|
183
|
+
<h1 id="0101">0.10.1</h1>
|
|
172
184
|
<ul><li>
|
|
173
185
|
<p>Implement intent to always return the path it was initialized with in case the argument was given</p>
|
|
174
186
|
</li></ul>
|
|
175
187
|
|
|
176
|
-
<h1 id="
|
|
188
|
+
<h1 id="0100">0.10.0</h1>
|
|
177
189
|
<ul><li>
|
|
178
190
|
<p>Fix a bug in error message for <code>comp_class_for!</code></p>
|
|
179
191
|
</li><li>
|
|
@@ -197,7 +209,7 @@
|
|
|
197
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>
|
|
198
210
|
</li></ul>
|
|
199
211
|
|
|
200
|
-
<h2 id="
|
|
212
|
+
<h2 id="steps-to-take-1">Steps to take</h2>
|
|
201
213
|
<ul><li>
|
|
202
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>
|
|
203
215
|
</li><li>
|
|
@@ -211,7 +223,7 @@
|
|
|
211
223
|
</li></ul>
|
|
212
224
|
</li></ul>
|
|
213
225
|
|
|
214
|
-
<h1 id="
|
|
226
|
+
<h1 id="090">0.9.0</h1>
|
|
215
227
|
<ul><li>
|
|
216
228
|
<p>Enhance Intent API:</p>
|
|
217
229
|
<ul><li>
|
|
@@ -221,7 +233,7 @@
|
|
|
221
233
|
</li></ul>
|
|
222
234
|
</li></ul>
|
|
223
235
|
|
|
224
|
-
<h2 id="
|
|
236
|
+
<h2 id="steps-to-take-2">Steps to take</h2>
|
|
225
237
|
<ul><li>
|
|
226
238
|
<p>Replace code like <code>button: { style: :link }</code> by simply <code>style: :link</code></p>
|
|
227
239
|
</li><li>
|
|
@@ -230,12 +242,12 @@
|
|
|
230
242
|
<p>Make sure that all kwargs in intents meant for buttons are wrapped in <code>button: { ... }</code>.</p>
|
|
231
243
|
</li></ul>
|
|
232
244
|
|
|
233
|
-
<h1 id="
|
|
245
|
+
<h1 id="081">0.8.1</h1>
|
|
234
246
|
<ul><li>
|
|
235
247
|
<p>Fix a problem in List resulting in <code>data_class</code> being read too early</p>
|
|
236
248
|
</li></ul>
|
|
237
249
|
|
|
238
|
-
<h1 id="
|
|
250
|
+
<h1 id="080">0.8.0</h1>
|
|
239
251
|
|
|
240
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>
|
|
241
253
|
<ul><li>
|
|
@@ -259,7 +271,7 @@
|
|
|
259
271
|
<p>Update documentation</p>
|
|
260
272
|
</li></ul>
|
|
261
273
|
|
|
262
|
-
<h2 id="
|
|
274
|
+
<h2 id="steps-to-take-3">Steps to take</h2>
|
|
263
275
|
<ul><li>
|
|
264
276
|
<p>Make sure you no longer use the following methods that have been removed:</p>
|
|
265
277
|
<ul><li>
|
|
@@ -298,14 +310,14 @@
|
|
|
298
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>
|
|
299
311
|
</li></ul>
|
|
300
312
|
|
|
301
|
-
<h1 id="
|
|
313
|
+
<h1 id="071">0.7.1</h1>
|
|
302
314
|
<ul><li>
|
|
303
315
|
<p>Implement <code>Compony::VirtualModel</code> and document it in the Readme file</p>
|
|
304
316
|
</li><li>
|
|
305
317
|
<p>Break up documentation into separate files</p>
|
|
306
318
|
</li></ul>
|
|
307
319
|
|
|
308
|
-
<h1 id="
|
|
320
|
+
<h1 id="070">0.7.0</h1>
|
|
309
321
|
<ul><li>
|
|
310
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>
|
|
311
323
|
</li><li>
|
|
@@ -319,72 +331,72 @@
|
|
|
319
331
|
</li></ul>
|
|
320
332
|
</li></ul>
|
|
321
333
|
|
|
322
|
-
<h2 id="
|
|
334
|
+
<h2 id="steps-to-take-4">Steps to take</h2>
|
|
323
335
|
<ul><li>
|
|
324
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>
|
|
325
337
|
</li></ul>
|
|
326
338
|
|
|
327
|
-
<h1 id="
|
|
339
|
+
<h1 id="064">0.6.4</h1>
|
|
328
340
|
<ul><li>
|
|
329
341
|
<p>Replace Feasibility’s error message generation in case of dependent errors by a logic that fits fastgettext’s modern pluralization</p>
|
|
330
342
|
</li></ul>
|
|
331
343
|
|
|
332
|
-
<h1 id="
|
|
344
|
+
<h1 id="063">0.6.3</h1>
|
|
333
345
|
<ul><li>
|
|
334
346
|
<p>Restrict multi-attachments to upload only when the form’s object is a new record</p>
|
|
335
347
|
</li></ul>
|
|
336
348
|
|
|
337
|
-
<h1 id="
|
|
349
|
+
<h1 id="062">0.6.2</h1>
|
|
338
350
|
<ul><li>
|
|
339
351
|
<p>Change download link label of attachments from “Download” to the actual filename</p>
|
|
340
352
|
</li><li>
|
|
341
353
|
<p>Support multiple attachments by providing a simple UI for adding and removing attachments</p>
|
|
342
354
|
</li></ul>
|
|
343
355
|
|
|
344
|
-
<h1 id="
|
|
356
|
+
<h1 id="061">0.6.1</h1>
|
|
345
357
|
<ul><li>
|
|
346
358
|
<p>Implement <code>default_sorting</code> in <code>Compony::Components::List</code></p>
|
|
347
359
|
</li></ul>
|
|
348
360
|
|
|
349
|
-
<h1 id="
|
|
361
|
+
<h1 id="060">0.6.0</h1>
|
|
350
362
|
<ul><li>
|
|
351
363
|
<p>Implement <code>Compony::Components::Show</code></p>
|
|
352
364
|
</li><li>
|
|
353
365
|
<p>Implement <code>Compony::Components::Index</code> and <code>Compony::Components::List</code></p>
|
|
354
366
|
</li></ul>
|
|
355
367
|
|
|
356
|
-
<h1 id="
|
|
368
|
+
<h1 id="059">0.5.9</h1>
|
|
357
369
|
<ul><li>
|
|
358
370
|
<p>Fix a bug in generator that was introduced with the previous commit</p>
|
|
359
371
|
</li></ul>
|
|
360
372
|
|
|
361
|
-
<h1 id="
|
|
373
|
+
<h1 id="058">0.5.8</h1>
|
|
362
374
|
<ul><li>
|
|
363
375
|
<p>Apply most recent rubocop recommendations</p>
|
|
364
376
|
</li><li>
|
|
365
377
|
<p>Update rubocop</p>
|
|
366
378
|
</li><li>
|
|
367
|
-
<
|
|
379
|
+
<p>#10: Implement feasibility framework for links</p>
|
|
368
380
|
</li><li>
|
|
369
381
|
<p>Support <code>BaseComponents</code></p>
|
|
370
382
|
</li></ul>
|
|
371
383
|
|
|
372
|
-
<h1 id="
|
|
384
|
+
<h1 id="057">0.5.7</h1>
|
|
373
385
|
<ul><li>
|
|
374
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>
|
|
375
387
|
</li></ul>
|
|
376
388
|
|
|
377
|
-
<h1 id="
|
|
389
|
+
<h1 id="056">0.5.6</h1>
|
|
378
390
|
<ul><li>
|
|
379
391
|
<p>Allow overriding the label in the view helper <code>compony_link</code></p>
|
|
380
392
|
</li></ul>
|
|
381
393
|
|
|
382
|
-
<h1 id="
|
|
394
|
+
<h1 id="055">0.5.5</h1>
|
|
383
395
|
<ul><li>
|
|
384
396
|
<p>Support <code>has_one</code> associations for feasibility</p>
|
|
385
397
|
</li></ul>
|
|
386
398
|
|
|
387
|
-
<h1 id="
|
|
399
|
+
<h1 id="054">0.5.4</h1>
|
|
388
400
|
<ul><li>
|
|
389
401
|
<p>Fix a failure description in Form</p>
|
|
390
402
|
</li><li>
|
|
@@ -395,7 +407,7 @@
|
|
|
395
407
|
<p>Implement <code>skip_forgery_protection!</code></p>
|
|
396
408
|
</li></ul>
|
|
397
409
|
|
|
398
|
-
<h1 id="
|
|
410
|
+
<h1 id="053">0.5.3</h1>
|
|
399
411
|
<ul><li>
|
|
400
412
|
<p>Support <code>standalone_name</code> in <code>Compony.button</code> and <code>compony_link</code></p>
|
|
401
413
|
</li><li>
|
|
@@ -408,7 +420,7 @@
|
|
|
408
420
|
<p>Support <code>disable!</code> and <code>disabled: true</code> in Form, disabling all inputs</p>
|
|
409
421
|
</li></ul>
|
|
410
422
|
|
|
411
|
-
<h1 id="
|
|
423
|
+
<h1 id="052">0.5.2</h1>
|
|
412
424
|
<ul><li>
|
|
413
425
|
<p>Add <code>constraints</code> to <code>standalone</code></p>
|
|
414
426
|
</li><li>
|
|
@@ -417,19 +429,19 @@
|
|
|
417
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>
|
|
418
430
|
</li></ul>
|
|
419
431
|
|
|
420
|
-
<h1 id="
|
|
432
|
+
<h1 id="051">0.5.1</h1>
|
|
421
433
|
<ul><li>
|
|
422
434
|
<p>Correctly handle <code>ActiveType::Object</code> virtual fields in Rails 7.2</p>
|
|
423
435
|
</li></ul>
|
|
424
436
|
|
|
425
|
-
<h1 id="
|
|
437
|
+
<h1 id="050">0.5.0</h1>
|
|
426
438
|
<ul><li>
|
|
427
439
|
<p>Require Ruby 3.3.5 and Rails 7.2.1</p>
|
|
428
440
|
</li><li>
|
|
429
441
|
<p>Update Gems Compony depends on (this is to ensure all Compony users have versions Compony is frequently tested against)</p>
|
|
430
442
|
</li></ul>
|
|
431
443
|
|
|
432
|
-
<h2 id="
|
|
444
|
+
<h2 id="steps-to-take-5">Steps to take</h2>
|
|
433
445
|
<ul><li>
|
|
434
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>
|
|
435
447
|
</li><li>
|
|
@@ -452,7 +464,7 @@
|
|
|
452
464
|
<p>Check for warnings and react accordingly</p>
|
|
453
465
|
</li></ul>
|
|
454
466
|
|
|
455
|
-
<h1 id="
|
|
467
|
+
<h1 id="041">0.4.1</h1>
|
|
456
468
|
<ul><li>
|
|
457
469
|
<p>Allow the argument <code>standalone_name</code> in button and path helper</p>
|
|
458
470
|
</li><li>
|
|
@@ -465,7 +477,7 @@
|
|
|
465
477
|
<p>Fix a bug that caused an override of input option arguments if the <code>accept</code> parameter is present</p>
|
|
466
478
|
</li></ul>
|
|
467
479
|
|
|
468
|
-
<h1 id="
|
|
480
|
+
<h1 id="040">0.4.0</h1>
|
|
469
481
|
<ul><li>
|
|
470
482
|
<p>Support Cancancan’s <code>accessible_attributes</code></p>
|
|
471
483
|
</li><li>
|
|
@@ -489,7 +501,7 @@
|
|
|
489
501
|
<p>Require Ruby 3.2.2</p>
|
|
490
502
|
</li></ul>
|
|
491
503
|
|
|
492
|
-
<h2 id="
|
|
504
|
+
<h2 id="steps-to-perform">Steps to perform</h2>
|
|
493
505
|
<ul><li>
|
|
494
506
|
<p>If using ActiveType, add <code>include ActiveModel::Attributes</code> at the top of your virtual models.</p>
|
|
495
507
|
</li><li>
|
|
@@ -512,19 +524,19 @@
|
|
|
512
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>
|
|
513
525
|
</li></ul>
|
|
514
526
|
|
|
515
|
-
<h1 id="
|
|
527
|
+
<h1 id="033">0.3.3</h1>
|
|
516
528
|
<ul><li>
|
|
517
529
|
<p>In <code>RequestContext</code>, distinguish between <code>content</code> and <code>content!</code>, where the first allows for missing content blocks.</p>
|
|
518
530
|
</li></ul>
|
|
519
531
|
|
|
520
|
-
<h1 id="
|
|
532
|
+
<h1 id="032">0.3.2</h1>
|
|
521
533
|
<ul><li>
|
|
522
534
|
<p>Add label content block to edit component</p>
|
|
523
535
|
</li><li>
|
|
524
536
|
<p>Introduce <code>remove_content!</code> and make its non-bang pendant tolerate missing blocks</p>
|
|
525
537
|
</li></ul>
|
|
526
538
|
|
|
527
|
-
<h1 id="
|
|
539
|
+
<h1 id="031">0.3.1</h1>
|
|
528
540
|
<ul><li>
|
|
529
541
|
<p>In <code>NaturalOrdering</code>, tolerate omitting payload only if it’s an override</p>
|
|
530
542
|
</li><li>
|
|
@@ -537,7 +549,7 @@
|
|
|
537
549
|
<p>Implement <code>remove_content</code> which allows removing a previously defined content block (useful for usage in subclasses)</p>
|
|
538
550
|
</li></ul>
|
|
539
551
|
|
|
540
|
-
<h1 id="
|
|
552
|
+
<h1 id="030">0.3.0</h1>
|
|
541
553
|
<ul><li>
|
|
542
554
|
<p>Internals:</p>
|
|
543
555
|
</li><li>
|
|
@@ -562,19 +574,19 @@
|
|
|
562
574
|
<p>Implement nesting of content blocks, as described in README.md -> “Nesting content blocks, calling a content block from another”</p>
|
|
563
575
|
</li></ul>
|
|
564
576
|
|
|
565
|
-
<h2 id="
|
|
577
|
+
<h2 id="steps-to-take-6">Steps to take</h2>
|
|
566
578
|
<ul><li>
|
|
567
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>
|
|
568
580
|
</li><li>
|
|
569
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>
|
|
570
582
|
</li></ul>
|
|
571
583
|
|
|
572
|
-
<h1 id="
|
|
584
|
+
<h1 id="023">0.2.3</h1>
|
|
573
585
|
<ul><li>
|
|
574
586
|
<p>Support collection of Anchormodels in hidden input</p>
|
|
575
587
|
</li></ul>
|
|
576
588
|
|
|
577
|
-
<h1 id="
|
|
589
|
+
<h1 id="022">0.2.2</h1>
|
|
578
590
|
<ul><li>
|
|
579
591
|
<p>Adjust gemspec</p>
|
|
580
592
|
</li><li>
|
|
@@ -585,7 +597,7 @@
|
|
|
585
597
|
<p>Replace custom anchormodel field implementation by Anchormodel’s new implementation of SimpleForm Input</p>
|
|
586
598
|
</li></ul>
|
|
587
599
|
|
|
588
|
-
<h1 id="
|
|
600
|
+
<h1 id="021">0.2.1</h1>
|
|
589
601
|
<ul><li>
|
|
590
602
|
<p>Fix a bug where the app crashed on HEAD verb</p>
|
|
591
603
|
</li><li>
|
|
@@ -597,27 +609,27 @@
|
|
|
597
609
|
</li><li>
|
|
598
610
|
<p>Implement <code>skip_autofocus</code> in Form</p>
|
|
599
611
|
</li><li>
|
|
600
|
-
<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>
|
|
601
613
|
</li></ul>
|
|
602
614
|
|
|
603
|
-
<h1 id="
|
|
615
|
+
<h1 id="020">0.2.0</h1>
|
|
604
616
|
<ul><li>
|
|
605
617
|
<p>Cleanup old code</p>
|
|
606
618
|
</li><li>
|
|
607
619
|
<p>Remove <code>check_config!</code> that was barely used</p>
|
|
608
620
|
</li></ul>
|
|
609
621
|
|
|
610
|
-
<h1 id="
|
|
622
|
+
<h1 id="011">0.1.1</h1>
|
|
611
623
|
<ul><li>
|
|
612
624
|
<p>Support and force Rails 7.1.2</p>
|
|
613
625
|
</li></ul>
|
|
614
626
|
|
|
615
|
-
<h2 id="
|
|
627
|
+
<h2 id="steps-to-perform-1">Steps to perform</h2>
|
|
616
628
|
<ul><li>
|
|
617
|
-
<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>
|
|
618
630
|
</li></ul>
|
|
619
631
|
|
|
620
|
-
<h1 id="
|
|
632
|
+
<h1 id="010">0.1.0</h1>
|
|
621
633
|
<ul><li>
|
|
622
634
|
<p>Remove (hopefully) obsolete database safeguard in <code>resolve_association!</code> as we should no longer be accessing the DB.</p>
|
|
623
635
|
</li><li>
|
|
@@ -630,12 +642,12 @@
|
|
|
630
642
|
<p>No longer rely on <code>controller.response.body.blank?</code> but use <code>controller.response_body.nil?</code> instead</p>
|
|
631
643
|
</li></ul>
|
|
632
644
|
|
|
633
|
-
<h2 id="
|
|
645
|
+
<h2 id="steps-to-perform-2">Steps to perform</h2>
|
|
634
646
|
<ul><li>
|
|
635
647
|
<p>Remove any calls to <code>primary_key_type</code></p>
|
|
636
648
|
</li></ul>
|
|
637
649
|
|
|
638
|
-
<h1 id="
|
|
650
|
+
<h1 id="009">0.0.9</h1>
|
|
639
651
|
|
|
640
652
|
<p>Do not use.</p>
|
|
641
653
|
<ul><li>
|
|
@@ -656,12 +668,12 @@
|
|
|
656
668
|
<p>Add new field kind percentage</p>
|
|
657
669
|
</li></ul>
|
|
658
670
|
|
|
659
|
-
<h2 id="
|
|
671
|
+
<h2 id="known-bugs">KNOWN BUGS</h2>
|
|
660
672
|
<ul><li>
|
|
661
673
|
<p>This version breaks polymorphic relations.</p>
|
|
662
674
|
</li></ul>
|
|
663
675
|
|
|
664
|
-
<h1 id="
|
|
676
|
+
<h1 id="008">0.0.8</h1>
|
|
665
677
|
<ul><li>
|
|
666
678
|
<p>Support selecting anchormodel inputs via radio buttons</p>
|
|
667
679
|
</li><li>
|
|
@@ -678,12 +690,12 @@
|
|
|
678
690
|
<p>Create new model field type :color</p>
|
|
679
691
|
</li></ul>
|
|
680
692
|
|
|
681
|
-
<h1 id="
|
|
693
|
+
<h1 id="007">0.0.7</h1>
|
|
682
694
|
<ul><li>
|
|
683
695
|
<p>Fix <code>standalone_access_permitted_for?</code> check for buttons pointing to non-get verbs</p>
|
|
684
696
|
</li></ul>
|
|
685
697
|
|
|
686
|
-
<h1 id="
|
|
698
|
+
<h1 id="006">0.0.6</h1>
|
|
687
699
|
<ul><li>
|
|
688
700
|
<p>Fix a bug that breaks hidden fields of type reference</p>
|
|
689
701
|
</li><li>
|
|
@@ -704,7 +716,7 @@
|
|
|
704
716
|
<p>In ModelField Anchormodel, tolerate “value” as input_html key and infer correct constant, allow form.object to be missing</p>
|
|
705
717
|
</li></ul>
|
|
706
718
|
|
|
707
|
-
<h1 id="
|
|
719
|
+
<h1 id="005">0.0.5</h1>
|
|
708
720
|
<ul><li>
|
|
709
721
|
<p>Fix row bug for Email field type</p>
|
|
710
722
|
</li><li>
|
|
@@ -721,31 +733,31 @@
|
|
|
721
733
|
<p>Support hidden Anchormodel fields</p>
|
|
722
734
|
</li></ul>
|
|
723
735
|
|
|
724
|
-
<h2 id="
|
|
736
|
+
<h2 id="known-bugs-1">KNOWN BUGS</h2>
|
|
725
737
|
<ul><li>
|
|
726
738
|
<p>Breaks hidden fields of type reference</p>
|
|
727
739
|
</li></ul>
|
|
728
740
|
|
|
729
|
-
<h1 id="
|
|
741
|
+
<h1 id="004">0.0.4</h1>
|
|
730
742
|
<ul><li>
|
|
731
743
|
<p>Unscope the namespace of resourceful components</p>
|
|
732
744
|
</li><li>
|
|
733
745
|
<p>Add field type :email</p>
|
|
734
746
|
</li></ul>
|
|
735
747
|
|
|
736
|
-
<h2 id="
|
|
748
|
+
<h2 id="steps-to-take-7">Steps to take</h2>
|
|
737
749
|
<ul><li>
|
|
738
750
|
<p>When inheriting from components, replace <code>Components::Resourceful::...</code> by <code>Components::...</code></p>
|
|
739
751
|
</li></ul>
|
|
740
752
|
|
|
741
|
-
<h1 id="
|
|
753
|
+
<h1 id="003">0.0.3</h1>
|
|
742
754
|
<ul><li>
|
|
743
755
|
<p>Tolerate nil anchormodels</p>
|
|
744
756
|
</li><li>
|
|
745
757
|
<p>Fix a nil pointer bug in namespace management</p>
|
|
746
758
|
</li></ul>
|
|
747
759
|
|
|
748
|
-
<h1 id="
|
|
760
|
+
<h1 id="002">0.0.2</h1>
|
|
749
761
|
<ul><li>
|
|
750
762
|
<p>Add new model field <code>Attachment</code></p>
|
|
751
763
|
</li><li>
|
|
@@ -754,13 +766,13 @@
|
|
|
754
766
|
<p>Update <code>Gemfile.lock</code></p>
|
|
755
767
|
</li></ul>
|
|
756
768
|
|
|
757
|
-
<h1 id="
|
|
769
|
+
<h1 id="001">0.0.1</h1>
|
|
758
770
|
|
|
759
771
|
<p>First version</p>
|
|
760
772
|
</div></div>
|
|
761
773
|
|
|
762
774
|
<div id="footer">
|
|
763
|
-
Generated on
|
|
775
|
+
Generated on Tue Aug 18 14:36:33 2026 by
|
|
764
776
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
765
777
|
0.9.34 (ruby-3.4.9).
|
|
766
778
|
</div>
|