compony 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/Gemfile.lock +1 -1
- data/README.md +10 -14
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/doc/ComponentGenerator.html +1 -1
- data/doc/Components.html +1 -1
- data/doc/ComponentsGenerator.html +1 -1
- data/doc/Compony/Component.html +193 -457
- 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 +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
- data/doc/Compony/ComponentMixins/Default/Standalone.html +187 -1
- data/doc/Compony/ComponentMixins/Default.html +1 -1
- data/doc/Compony/ComponentMixins/Resourceful.html +2 -2
- data/doc/Compony/ComponentMixins.html +1 -1
- data/doc/Compony/Components/Button.html +2 -2
- data/doc/Compony/Components/Buttons/CssButton.html +282 -0
- data/doc/Compony/Components/Buttons/Link.html +252 -0
- data/doc/Compony/Components/Buttons.html +126 -0
- data/doc/Compony/Components/Destroy.html +11 -11
- data/doc/Compony/Components/Edit.html +14 -14
- data/doc/Compony/Components/Form.html +100 -100
- data/doc/Compony/Components/Index.html +2 -2
- data/doc/Compony/Components/List.html +3 -3
- data/doc/Compony/Components/New.html +2 -2
- data/doc/Compony/Components/Show.html +24 -24
- data/doc/Compony/Components/WithForm.html +3 -3
- data/doc/Compony/Components.html +5 -3
- data/doc/Compony/ControllerMixin.html +2 -2
- data/doc/Compony/Engine.html +1 -1
- data/doc/Compony/ExposedIntentsDsl.html +403 -0
- data/doc/Compony/Intent.html +1503 -0
- data/doc/Compony/MethodAccessibleHash.html +1 -1
- data/doc/Compony/ModelFields/Anchormodel.html +1 -1
- data/doc/Compony/ModelFields/Association.html +2 -2
- data/doc/Compony/ModelFields/Attachment.html +1 -1
- data/doc/Compony/ModelFields/Base.html +1 -1
- 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 +177 -14
- data/doc/Compony/Version.html +1 -1
- data/doc/Compony/ViewHelpers.html +15 -272
- data/doc/Compony/VirtualModel.html +1 -1
- data/doc/Compony.html +303 -837
- data/doc/ComponyController.html +1 -1
- data/doc/_index.html +30 -2
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +11 -18
- data/doc/guide/basic_component.md +12 -8
- data/doc/guide/example.md +17 -17
- data/doc/guide/feasibility.md +4 -2
- data/doc/guide/generators.md +4 -2
- data/doc/guide/inheritance.md +4 -2
- data/doc/guide/installation.md +4 -2
- data/doc/guide/intents.md +167 -0
- data/doc/guide/internal_datastructures.md +4 -2
- data/doc/guide/model_fields.md +4 -2
- data/doc/guide/nesting.md +5 -3
- data/doc/guide/ownership.md +5 -3
- data/doc/guide/pre_built_components/destroy.md +3 -3
- data/doc/guide/pre_built_components/edit.md +1 -1
- data/doc/guide/pre_built_components/form.md +1 -1
- data/doc/guide/pre_built_components/index.md +1 -1
- data/doc/guide/pre_built_components/list.md +1 -1
- data/doc/guide/pre_built_components/new.md +2 -2
- data/doc/guide/pre_built_components/show.md +1 -1
- data/doc/guide/pre_built_components/with_form.md +1 -1
- data/doc/guide/pre_built_components.md +4 -3
- data/doc/guide/resourceful.md +5 -3
- data/doc/guide/standalone.md +10 -2
- data/doc/guide/virtual_models.md +4 -2
- data/doc/index.html +11 -18
- data/doc/method_list.html +273 -161
- data/doc/top-level-namespace.html +1 -1
- data/lib/compony/component.rb +19 -48
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +2 -2
- data/lib/compony/component_mixins/default/standalone.rb +16 -0
- data/lib/compony/component_mixins/resourceful.rb +1 -1
- data/lib/compony/components/buttons/css_button.rb +32 -0
- data/lib/compony/components/buttons/link.rb +31 -0
- data/lib/compony/components/destroy.rb +9 -8
- data/lib/compony/components/edit.rb +5 -4
- data/lib/compony/components/form.rb +7 -1
- data/lib/compony/components/index.rb +2 -2
- data/lib/compony/components/list.rb +4 -4
- data/lib/compony/components/new.rb +1 -1
- data/lib/compony/components/show.rb +8 -11
- data/lib/compony/components/with_form.rb +1 -1
- data/lib/compony/exposed_intents_dsl.rb +29 -0
- data/lib/compony/intent.rb +145 -0
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/request_context.rb +21 -0
- data/lib/compony/view_helpers.rb +5 -48
- data/lib/compony.rb +63 -149
- metadata +12 -6
- data/doc/guide/helpers.md +0 -156
- data/doc/guide/pre_built_components/button.md +0 -8
- data/doc/guide/root_actions.md +0 -67
- data/lib/compony/components/button.rb +0 -61
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
<li class="public ">
|
|
125
125
|
<span class="summary_signature">
|
|
126
126
|
|
|
127
|
-
<a href="#
|
|
127
|
+
<a href="#render_intent-instance_method" title="#render_intent (instance method)">#<strong>render_intent</strong>(button: {}) ⇒ Object </a>
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
@@ -139,55 +139,7 @@
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
<span class="summary_desc"><div class='inline'>
|
|
142
|
-
<p>
|
|
143
|
-
</div></span>
|
|
144
|
-
|
|
145
|
-
</li>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<li class="public ">
|
|
149
|
-
<span class="summary_signature">
|
|
150
|
-
|
|
151
|
-
<a href="#compony_button-instance_method" title="#compony_button (instance method)">#<strong>compony_button</strong> ⇒ Object </a>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
</span>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<span class="summary_desc"><div class='inline'>
|
|
166
|
-
<p>Given a component and a family/model, this instanciates and renders a button component.</p>
|
|
167
|
-
</div></span>
|
|
168
|
-
|
|
169
|
-
</li>
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<li class="public ">
|
|
173
|
-
<span class="summary_signature">
|
|
174
|
-
|
|
175
|
-
<a href="#compony_link-instance_method" title="#compony_link (instance method)">#<strong>compony_link</strong>(comp_name_or_cst_or_class, model_or_family_name_or_cst = nil, *link_args, label: nil, label_opts: {}, params: {}, feasibility_action: nil, feasibility_target: nil, standalone_name: nil, **link_kwargs) ⇒ Object </a>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
</span>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
<span class="summary_desc"><div class='inline'>
|
|
190
|
-
<p>Renders a link to a component given a comp and model or family.</p>
|
|
142
|
+
<p>Renders a button/link to a component given a comp and model or family.</p>
|
|
191
143
|
</div></span>
|
|
192
144
|
|
|
193
145
|
</li>
|
|
@@ -203,102 +155,9 @@
|
|
|
203
155
|
|
|
204
156
|
|
|
205
157
|
<div class="method_details first">
|
|
206
|
-
<h3 class="signature first" id="
|
|
207
|
-
|
|
208
|
-
#<strong>compony_actions</strong> ⇒ <tt>Object</tt>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</h3><div class="docstring">
|
|
215
|
-
<div class="discussion">
|
|
216
|
-
|
|
217
|
-
<p>Use this in your application layout to render all actions of the current root component.</p>
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
<div class="tags">
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
</div><table class="source_code">
|
|
226
|
-
<tr>
|
|
227
|
-
<td>
|
|
228
|
-
<pre class="lines">
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
8
|
|
232
|
-
9
|
|
233
|
-
10
|
|
234
|
-
11</pre>
|
|
235
|
-
</td>
|
|
236
|
-
<td>
|
|
237
|
-
<pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line 8</span>
|
|
238
|
-
|
|
239
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_compony_actions'>compony_actions</span>
|
|
240
|
-
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_root_comp'><span class='object_link'><a href="../Compony.html#root_comp-class_method" title="Compony.root_comp (method)">root_comp</a></span></span>
|
|
241
|
-
<span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_root_comp'><span class='object_link'><a href="../Compony.html#root_comp-class_method" title="Compony.root_comp (method)">root_comp</a></span></span><span class='period'>.</span><span class='id identifier rubyid_render_actions'>render_actions</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>wrapper_class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>root-actions</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>action_class:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>root-action</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
242
|
-
<span class='kw'>end</span></pre>
|
|
243
|
-
</td>
|
|
244
|
-
</tr>
|
|
245
|
-
</table>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
<div class="method_details ">
|
|
249
|
-
<h3 class="signature " id="compony_button-instance_method">
|
|
250
|
-
|
|
251
|
-
#<strong>compony_button</strong> ⇒ <tt>Object</tt>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
</h3><div class="docstring">
|
|
258
|
-
<div class="discussion">
|
|
259
|
-
|
|
260
|
-
<p>Given a component and a family/model, this instanciates and renders a button component.</p>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
<div class="tags">
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<p class="tag_title">See Also:</p>
|
|
269
|
-
<ul class="see">
|
|
270
|
-
|
|
271
|
-
<li>Check Compony.button for accepted params</li>
|
|
272
|
-
|
|
273
|
-
<li><span class='object_link'><a href="Components/Button.html" title="Compony::Components::Button (class)">Compony::Components::Button: the default underlying implementation</a></span></li>
|
|
274
|
-
|
|
275
|
-
</ul>
|
|
276
|
-
|
|
277
|
-
</div><table class="source_code">
|
|
278
|
-
<tr>
|
|
279
|
-
<td>
|
|
280
|
-
<pre class="lines">
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
54
|
|
284
|
-
55
|
|
285
|
-
56</pre>
|
|
286
|
-
</td>
|
|
287
|
-
<td>
|
|
288
|
-
<pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line 54</span>
|
|
289
|
-
|
|
290
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_compony_button'>compony_button</span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span>
|
|
291
|
-
<span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_button'><span class='object_link'><a href="../Compony.html#button-class_method" title="Compony.button (method)">button</a></span></span><span class='lparen'>(</span><span class='op'>...</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_controller'>controller</span><span class='rparen'>)</span>
|
|
292
|
-
<span class='kw'>end</span></pre>
|
|
293
|
-
</td>
|
|
294
|
-
</tr>
|
|
295
|
-
</table>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
<div class="method_details ">
|
|
299
|
-
<h3 class="signature " id="compony_link-instance_method">
|
|
158
|
+
<h3 class="signature first" id="render_intent-instance_method">
|
|
300
159
|
|
|
301
|
-
#<strong>
|
|
160
|
+
#<strong>render_intent</strong>(button: {}) ⇒ <tt>Object</tt>
|
|
302
161
|
|
|
303
162
|
|
|
304
163
|
|
|
@@ -307,7 +166,7 @@
|
|
|
307
166
|
</h3><div class="docstring">
|
|
308
167
|
<div class="discussion">
|
|
309
168
|
|
|
310
|
-
<p>Renders a link to a component given a comp and model or family. If authentication is configured and the current user has insufficient permissions to access the target object, the link is not displayed
|
|
169
|
+
<p>Renders a button/link to a component given a comp and model or family. If authentication is configured and the current user has insufficient permissions to access the target object, the link is not displayed. When inside a request context (<code>content do...</code>), this is preceded by <span class='object_link'><a href="RequestContext.html#render_intent-instance_method" title="Compony::RequestContext#render_intent (method)">RequestContext#render_intent</a></span>.</p>
|
|
311
170
|
|
|
312
171
|
|
|
313
172
|
</div>
|
|
@@ -318,57 +177,7 @@
|
|
|
318
177
|
|
|
319
178
|
<li>
|
|
320
179
|
|
|
321
|
-
<span class='name'>
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
—
|
|
329
|
-
<div class='inline'>
|
|
330
|
-
<p>The component that should be loaded, for instance <code>ShowForAll</code>, <code>'ShowForAll'</code> or <code>:show_for_all</code></p>
|
|
331
|
-
</div>
|
|
332
|
-
|
|
333
|
-
</li>
|
|
334
|
-
|
|
335
|
-
<li>
|
|
336
|
-
|
|
337
|
-
<span class='name'>model_or_family_name_or_cst</span>
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
<span class='type'>(<tt>String</tt>, <tt>Symbol</tt>, <tt>ApplicationRecord</tt>)</span>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
—
|
|
347
|
-
<div class='inline'>
|
|
348
|
-
<p>Either the family that contains the requested component, or an instance implementing <code>model_name</code> from which the family name is auto-generated. Examples: <code>Users</code>, <code>'Users'</code>, <code>:users</code>, <code>User.first</code></p>
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
</li>
|
|
352
|
-
|
|
353
|
-
<li>
|
|
354
|
-
|
|
355
|
-
<span class='name'>link_args</span>
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
—
|
|
363
|
-
<div class='inline'>
|
|
364
|
-
<p>Positional arguments that will be passed to the Rails <code>link_to</code> helper</p>
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
</li>
|
|
368
|
-
|
|
369
|
-
<li>
|
|
370
|
-
|
|
371
|
-
<span class='name'>label_opts</span>
|
|
180
|
+
<span class='name'>button</span>
|
|
372
181
|
|
|
373
182
|
|
|
374
183
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
@@ -379,23 +188,7 @@
|
|
|
379
188
|
|
|
380
189
|
—
|
|
381
190
|
<div class='inline'>
|
|
382
|
-
<p>
|
|
383
|
-
</div>
|
|
384
|
-
|
|
385
|
-
</li>
|
|
386
|
-
|
|
387
|
-
<li>
|
|
388
|
-
|
|
389
|
-
<span class='name'>link_kwargs</span>
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
—
|
|
397
|
-
<div class='inline'>
|
|
398
|
-
<p>Named arguments that will be passed to the Rails <code>link_to</code> helper</p>
|
|
191
|
+
<p>Parameters that will be given to the button component initializer.</p>
|
|
399
192
|
</div>
|
|
400
193
|
|
|
401
194
|
</li>
|
|
@@ -409,65 +202,15 @@
|
|
|
409
202
|
<pre class="lines">
|
|
410
203
|
|
|
411
204
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
25
|
|
416
|
-
26
|
|
417
|
-
27
|
|
418
|
-
28
|
|
419
|
-
29
|
|
420
|
-
30
|
|
421
|
-
31
|
|
422
|
-
32
|
|
423
|
-
33
|
|
424
|
-
34
|
|
425
|
-
35
|
|
426
|
-
36
|
|
427
|
-
37
|
|
428
|
-
38
|
|
429
|
-
39
|
|
430
|
-
40
|
|
431
|
-
41
|
|
432
|
-
42
|
|
433
|
-
43
|
|
434
|
-
44
|
|
435
|
-
45
|
|
436
|
-
46
|
|
437
|
-
47
|
|
438
|
-
48
|
|
439
|
-
49</pre>
|
|
205
|
+
11
|
|
206
|
+
12
|
|
207
|
+
13</pre>
|
|
440
208
|
</td>
|
|
441
209
|
<td>
|
|
442
|
-
<pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line
|
|
443
|
-
|
|
444
|
-
<span class='kw'>def</span> <span class='id identifier
|
|
445
|
-
|
|
446
|
-
<span class='op'>*</span><span class='id identifier rubyid_link_args'>link_args</span><span class='comma'>,</span>
|
|
447
|
-
<span class='label'>label:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
448
|
-
<span class='label'>label_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
|
|
449
|
-
<span class='label'>params:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span>
|
|
450
|
-
<span class='label'>feasibility_action:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
451
|
-
<span class='label'>feasibility_target:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
452
|
-
<span class='label'>standalone_name:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
|
453
|
-
<span class='op'>**</span><span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='rparen'>)</span>
|
|
454
|
-
<span class='id identifier rubyid_model'>model</span> <span class='op'>=</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:model_name</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
|
455
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span> <span class='op'><=</span> <span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Component.html" title="Compony::Component (class)">Component</a></span></span><span class='rparen'>)</span>
|
|
456
|
-
<span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span> <span class='op'>=</span> <span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>data:</span> <span class='id identifier rubyid_model'>model</span><span class='rparen'>)</span>
|
|
457
|
-
<span class='kw'>else</span>
|
|
458
|
-
<span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_comp_class_for!'><span class='object_link'><a href="../Compony.html#comp_class_for!-class_method" title="Compony.comp_class_for! (method)">comp_class_for!</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='comma'>,</span> <span class='id identifier rubyid_model_or_family_name_or_cst'>model_or_family_name_or_cst</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>data:</span> <span class='id identifier rubyid_model'>model</span><span class='rparen'>)</span>
|
|
459
|
-
<span class='kw'>end</span>
|
|
460
|
-
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span><span class='period'>.</span><span class='id identifier rubyid_standalone_access_permitted_for?'>standalone_access_permitted_for?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>standalone_name:</span><span class='rparen'>)</span>
|
|
461
|
-
<span class='id identifier rubyid_feasibility_action'>feasibility_action</span> <span class='op'>||=</span> <span class='id identifier rubyid_comp_name_or_cst_or_class'>comp_name_or_cst_or_class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
|
462
|
-
<span class='id identifier rubyid_feasibility_target'>feasibility_target</span> <span class='op'>||=</span> <span class='id identifier rubyid_model'>model</span>
|
|
463
|
-
<span class='id identifier rubyid_label'>label</span> <span class='op'>||=</span> <span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='lparen'>(</span><span class='id identifier rubyid_model'>model</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_label_opts'>label_opts</span><span class='rparen'>)</span>
|
|
464
|
-
<span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_path'><span class='object_link'><a href="../Compony.html#path-class_method" title="Compony.path (method)">path</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span><span class='period'>.</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_target_comp_instance'>target_comp_instance</span><span class='period'>.</span><span class='id identifier rubyid_family_name'>family_name</span><span class='comma'>,</span> <span class='id identifier rubyid_model'>model</span><span class='comma'>,</span> <span class='label'>standalone_name:</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
|
465
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_feasibility_target'>feasibility_target</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_feasibility_target'>feasibility_target</span><span class='period'>.</span><span class='id identifier rubyid_feasible?'>feasible?</span><span class='lparen'>(</span><span class='id identifier rubyid_feasibility_action'>feasibility_action</span><span class='rparen'>)</span>
|
|
466
|
-
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span>
|
|
467
|
-
<span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='lbracket'>[</span><span class='symbol'>:class</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> disabled</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>disabled</span><span class='tstring_end'>'</span></span>
|
|
468
|
-
<span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='lbracket'>[</span><span class='symbol'>:title</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_feasibility_target'>feasibility_target</span><span class='period'>.</span><span class='id identifier rubyid_full_feasibility_messages'>full_feasibility_messages</span><span class='lparen'>(</span><span class='id identifier rubyid_feasibility_action'>feasibility_action</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_presence'>presence</span>
|
|
469
|
-
<span class='kw'>end</span>
|
|
470
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_helpers'>helpers</span><span class='period'>.</span><span class='id identifier rubyid_link_to'>link_to</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_link_args'>link_args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='rparen'>)</span>
|
|
210
|
+
<pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line 11</span>
|
|
211
|
+
|
|
212
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_render_intent'>render_intent</span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span>
|
|
213
|
+
<span class='const'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_intent'><span class='object_link'><a href="../Compony.html#intent-class_method" title="Compony.intent (method)">intent</a></span></span><span class='lparen'>(</span><span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_button'>button</span><span class='rparen'>)</span>
|
|
471
214
|
<span class='kw'>end</span></pre>
|
|
472
215
|
</td>
|
|
473
216
|
</tr>
|
|
@@ -479,7 +222,7 @@
|
|
|
479
222
|
</div>
|
|
480
223
|
|
|
481
224
|
<div id="footer">
|
|
482
|
-
Generated on Thu Nov
|
|
225
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
483
226
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
484
227
|
0.9.34 (ruby-3.3.5).
|
|
485
228
|
</div>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
</div>
|
|
143
143
|
|
|
144
144
|
<div id="footer">
|
|
145
|
-
Generated on Thu Nov
|
|
145
|
+
Generated on Thu Nov 27 16:02:22 2025 by
|
|
146
146
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
147
147
|
0.9.34 (ruby-3.3.5).
|
|
148
148
|
</div>
|