compony 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +3 -3
  4. data/README.md +1397 -33
  5. data/Rakefile +6 -2
  6. data/TODO.md +1 -0
  7. data/VERSION +1 -0
  8. data/compony.gemspec +7 -7
  9. data/doc/ComponentGenerator.html +231 -0
  10. data/doc/Components.html +105 -0
  11. data/doc/ComponentsGenerator.html +203 -0
  12. data/doc/Compony/Component.html +2098 -0
  13. data/doc/Compony/ComponentMixins/Default/Labelling.html +406 -0
  14. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +539 -0
  15. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +588 -0
  16. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +577 -0
  17. data/doc/Compony/ComponentMixins/Default/Standalone.html +692 -0
  18. data/doc/Compony/ComponentMixins/Default.html +126 -0
  19. data/doc/Compony/ComponentMixins/Resourceful.html +1193 -0
  20. data/doc/Compony/ComponentMixins.html +126 -0
  21. data/doc/Compony/Components/Button.html +293 -0
  22. data/doc/Compony/Components/Destroy.html +384 -0
  23. data/doc/Compony/Components/Edit.html +462 -0
  24. data/doc/Compony/Components/Form.html +1112 -0
  25. data/doc/Compony/Components/New.html +462 -0
  26. data/doc/Compony/Components/WithForm.html +528 -0
  27. data/doc/Compony/Components.html +126 -0
  28. data/doc/Compony/ControllerMixin.html +136 -0
  29. data/doc/Compony/Engine.html +133 -0
  30. data/doc/Compony/MethodAccessibleHash.html +453 -0
  31. data/doc/Compony/ModelFields/Anchormodel.html +383 -0
  32. data/doc/Compony/ModelFields/Association.html +613 -0
  33. data/doc/Compony/ModelFields/Attachment.html +305 -0
  34. data/doc/Compony/ModelFields/Base.html +1066 -0
  35. data/doc/Compony/ModelFields/Boolean.html +232 -0
  36. data/doc/Compony/ModelFields/Color.html +299 -0
  37. data/doc/Compony/ModelFields/Currency.html +232 -0
  38. data/doc/Compony/ModelFields/Date.html +232 -0
  39. data/doc/Compony/ModelFields/Datetime.html +232 -0
  40. data/doc/Compony/ModelFields/Decimal.html +154 -0
  41. data/doc/Compony/ModelFields/Email.html +240 -0
  42. data/doc/Compony/ModelFields/Float.html +154 -0
  43. data/doc/Compony/ModelFields/Integer.html +154 -0
  44. data/doc/Compony/ModelFields/Percentage.html +232 -0
  45. data/doc/Compony/ModelFields/Phone.html +301 -0
  46. data/doc/Compony/ModelFields/RichText.html +232 -0
  47. data/doc/Compony/ModelFields/String.html +154 -0
  48. data/doc/Compony/ModelFields/Text.html +154 -0
  49. data/doc/Compony/ModelFields/Time.html +154 -0
  50. data/doc/Compony/ModelFields/Url.html +240 -0
  51. data/doc/Compony/ModelFields.html +126 -0
  52. data/doc/Compony/ModelMixin.html +524 -0
  53. data/doc/Compony/RequestContext.html +791 -0
  54. data/doc/Compony/Version.html +139 -0
  55. data/doc/Compony/ViewHelpers.html +443 -0
  56. data/doc/Compony.html +2156 -0
  57. data/doc/ComponyController.html +124 -0
  58. data/doc/_index.html +569 -0
  59. data/doc/class_list.html +51 -0
  60. data/doc/css/common.css +1 -0
  61. data/doc/css/full_list.css +58 -0
  62. data/doc/css/style.css +497 -0
  63. data/doc/file.README.html +1565 -0
  64. data/doc/file_list.html +56 -0
  65. data/doc/frames.html +17 -0
  66. data/doc/imgs/intro-example-destroy.png +0 -0
  67. data/doc/imgs/intro-example-edit.png +0 -0
  68. data/doc/imgs/intro-example-index.png +0 -0
  69. data/doc/imgs/intro-example-new.png +0 -0
  70. data/doc/imgs/intro-example-show.png +0 -0
  71. data/doc/index.html +1565 -0
  72. data/doc/js/app.js +314 -0
  73. data/doc/js/full_list.js +216 -0
  74. data/doc/js/jquery.js +4 -0
  75. data/doc/method_list.html +1435 -0
  76. data/doc/resourceful_lifecycle.png +0 -0
  77. data/doc/top-level-namespace.html +112 -0
  78. data/lib/compony/component.rb +2 -1
  79. data/lib/compony/component_mixins/default/standalone.rb +4 -0
  80. data/lib/compony/components/with_form.rb +1 -0
  81. data/lib/compony/model_fields/anchormodel.rb +0 -22
  82. data/lib/compony/model_mixin.rb +12 -2
  83. data/lib/compony/version.rb +1 -7
  84. data/logo.svg +133 -0
  85. metadata +82 -6
@@ -0,0 +1,139 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Compony::Version
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Compony::Version";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (V)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span>
41
+ &raquo;
42
+ <span class="title">Version</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Compony::Version
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/compony/version.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <div class="docstring">
87
+ <div class="discussion">
88
+
89
+
90
+ </div>
91
+ </div>
92
+ <div class="tags">
93
+
94
+
95
+ </div>
96
+
97
+ <h2>
98
+ Constant Summary
99
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
100
+ </h2>
101
+
102
+ <dl class="constants">
103
+
104
+ <dt id="LABEL-constant" class="">LABEL =
105
+ <div class="docstring">
106
+ <div class="discussion">
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+ </dt>
116
+ <dd><pre class="code"><span class='lparen'>(</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span> <span class='op'>/</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>VERSION</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span></pre></dd>
117
+
118
+ </dl>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ </div>
130
+
131
+ <div id="footer">
132
+ Generated on Wed Apr 24 17:14:05 2024 by
133
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
+ 0.9.34 (ruby-3.2.2).
135
+ </div>
136
+
137
+ </div>
138
+ </body>
139
+ </html>
@@ -0,0 +1,443 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Compony::ViewHelpers
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Compony::ViewHelpers";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (V)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony</a></span></span>
41
+ &raquo;
42
+ <span class="title">ViewHelpers</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Compony::ViewHelpers
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+ <dl>
78
+ <dt>Included in:</dt>
79
+ <dd><span class='object_link'><a href="ControllerMixin.html" title="Compony::ControllerMixin (module)">ControllerMixin</a></span></dd>
80
+ </dl>
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/compony/view_helpers.rb</dd>
87
+ </dl>
88
+
89
+ </div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+
94
+ <p>Methods in this module are available in content blocks and Rails views. Rule of thumb: this holds methods that require a view context and results are rendered immediately.</p>
95
+
96
+
97
+ </div>
98
+ </div>
99
+ <div class="tags">
100
+
101
+
102
+ <p class="tag_title">See Also:</p>
103
+ <ul class="see">
104
+
105
+ <li><span class='object_link'><a href="../Compony.html" title="Compony (module)">Compony for standalone/pure helpers</a></span></li>
106
+
107
+ </ul>
108
+
109
+ </div>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#compony_actions-instance_method" title="#compony_actions (instance method)">#<strong>compony_actions</strong> &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'>
142
+ <p>Use this in your application layout to render all actions of the current root component.</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> &#x21d2; 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, model_or_family_name_or_cst, *link_args, label_opts: {}, **link_kwargs) &#x21d2; 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>
191
+ </div></span>
192
+
193
+ </li>
194
+
195
+
196
+ </ul>
197
+
198
+
199
+
200
+
201
+ <div id="instance_method_details" class="method_details_list">
202
+ <h2>Instance Method Details</h2>
203
+
204
+
205
+ <div class="method_details first">
206
+ <h3 class="signature first" id="compony_actions-instance_method">
207
+
208
+ #<strong>compony_actions</strong> &#x21d2; <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'>&#39;</span><span class='tstring_content'>root-actions</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>action_class:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>root-action</span><span class='tstring_end'>&#39;</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> &#x21d2; <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
+ 32
284
+ 33
285
+ 34</pre>
286
+ </td>
287
+ <td>
288
+ <pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line 32</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">
300
+
301
+ #<strong>compony_link</strong>(comp_name_or_cst, model_or_family_name_or_cst, *link_args, label_opts: {}, **link_kwargs) &#x21d2; <tt>Object</tt>
302
+
303
+
304
+
305
+
306
+
307
+ </h3><div class="docstring">
308
+ <div class="discussion">
309
+
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.</p>
311
+
312
+
313
+ </div>
314
+ </div>
315
+ <div class="tags">
316
+ <p class="tag_title">Parameters:</p>
317
+ <ul class="param">
318
+
319
+ <li>
320
+
321
+ <span class='name'>comp_name_or_cst</span>
322
+
323
+
324
+ <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span>
325
+
326
+
327
+
328
+ &mdash;
329
+ <div class='inline'>
330
+ <p>The component that should be loaded, for instance <code>ShowForAll</code>, <code>&#39;ShowForAll&#39;</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
+
344
+ &mdash;
345
+ <div class='inline'>
346
+ <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>&#39;Users&#39;</code>, <code>:users</code>, <code>User.first</code></p>
347
+ </div>
348
+
349
+ </li>
350
+
351
+ <li>
352
+
353
+ <span class='name'>link_args</span>
354
+
355
+
356
+ <span class='type'>(<tt>Array</tt>)</span>
357
+
358
+
359
+
360
+ &mdash;
361
+ <div class='inline'>
362
+ <p>Positional arguments that will be passed to the Rails <code>link_to</code> helper</p>
363
+ </div>
364
+
365
+ </li>
366
+
367
+ <li>
368
+
369
+ <span class='name'>label_opts</span>
370
+
371
+
372
+ <span class='type'>(<tt>Hash</tt>)</span>
373
+
374
+
375
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
376
+
377
+
378
+ &mdash;
379
+ <div class='inline'>
380
+ <p>Options hash that will be passed to the label method (see <span class='object_link'><a href="ComponentMixins/Default/Labelling.html#label-instance_method" title="Compony::ComponentMixins::Default::Labelling#label (method)">ComponentMixins::Default::Labelling#label</a></span>)</p>
381
+ </div>
382
+
383
+ </li>
384
+
385
+ <li>
386
+
387
+ <span class='name'>link_kwargs</span>
388
+
389
+
390
+ <span class='type'>(<tt>Hash</tt>)</span>
391
+
392
+
393
+
394
+ &mdash;
395
+ <div class='inline'>
396
+ <p>Named arguments that will be passed to the Rails <code>link_to</code> helper</p>
397
+ </div>
398
+
399
+ </li>
400
+
401
+ </ul>
402
+
403
+
404
+ </div><table class="source_code">
405
+ <tr>
406
+ <td>
407
+ <pre class="lines">
408
+
409
+
410
+ 22
411
+ 23
412
+ 24
413
+ 25
414
+ 26
415
+ 27</pre>
416
+ </td>
417
+ <td>
418
+ <pre class="code"><span class="info file"># File 'lib/compony/view_helpers.rb', line 22</span>
419
+
420
+ <span class='kw'>def</span> <span class='id identifier rubyid_compony_link'>compony_link</span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name_or_cst'>comp_name_or_cst</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='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_link_args'>link_args</span><span class='comma'>,</span> <span class='label'>label_opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_link_kwargs'>link_kwargs</span><span class='rparen'>)</span>
421
+ <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>
422
+ <span class='id identifier rubyid_comp'>comp</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'>comp_name_or_cst</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>
423
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_comp'>comp</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='rparen'>)</span>
424
+ <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_comp'>comp</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><span class='comma'>,</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_comp'>comp</span><span class='period'>.</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_comp'>comp</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='rparen'>)</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>
425
+ <span class='kw'>end</span></pre>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ </div>
432
+
433
+ </div>
434
+
435
+ <div id="footer">
436
+ Generated on Wed Apr 24 17:14:06 2024 by
437
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
438
+ 0.9.34 (ruby-3.2.2).
439
+ </div>
440
+
441
+ </div>
442
+ </body>
443
+ </html>