compony 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/CHANGELOG.md +23 -0
  4. data/Gemfile.lock +3 -3
  5. data/README.md +80 -13
  6. data/Rakefile +1 -1
  7. data/VERSION +1 -1
  8. data/compony.gemspec +5 -5
  9. data/doc/ComponentGenerator.html +1 -1
  10. data/doc/Components.html +1 -1
  11. data/doc/ComponentsGenerator.html +1 -1
  12. data/doc/Compony/Component.html +308 -341
  13. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  16. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  17. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  18. data/doc/Compony/ComponentMixins/Default.html +1 -1
  19. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  20. data/doc/Compony/ComponentMixins.html +1 -1
  21. data/doc/Compony/Components/Button.html +3 -3
  22. data/doc/Compony/Components/Destroy.html +3 -3
  23. data/doc/Compony/Components/Edit.html +19 -19
  24. data/doc/Compony/Components/Form.html +3 -3
  25. data/doc/Compony/Components/New.html +19 -19
  26. data/doc/Compony/Components/WithForm.html +4 -4
  27. data/doc/Compony/Components.html +1 -1
  28. data/doc/Compony/ControllerMixin.html +1 -1
  29. data/doc/Compony/Engine.html +1 -1
  30. data/doc/Compony/MethodAccessibleHash.html +1 -1
  31. data/doc/Compony/ModelFields/Anchormodel.html +7 -3
  32. data/doc/Compony/ModelFields/Association.html +1 -1
  33. data/doc/Compony/ModelFields/Attachment.html +1 -1
  34. data/doc/Compony/ModelFields/Base.html +1 -1
  35. data/doc/Compony/ModelFields/Boolean.html +1 -1
  36. data/doc/Compony/ModelFields/Color.html +1 -1
  37. data/doc/Compony/ModelFields/Currency.html +1 -1
  38. data/doc/Compony/ModelFields/Date.html +1 -1
  39. data/doc/Compony/ModelFields/Datetime.html +1 -1
  40. data/doc/Compony/ModelFields/Decimal.html +1 -1
  41. data/doc/Compony/ModelFields/Email.html +1 -1
  42. data/doc/Compony/ModelFields/Float.html +1 -1
  43. data/doc/Compony/ModelFields/Integer.html +1 -1
  44. data/doc/Compony/ModelFields/Percentage.html +1 -1
  45. data/doc/Compony/ModelFields/Phone.html +1 -1
  46. data/doc/Compony/ModelFields/RichText.html +1 -1
  47. data/doc/Compony/ModelFields/String.html +1 -1
  48. data/doc/Compony/ModelFields/Text.html +1 -1
  49. data/doc/Compony/ModelFields/Time.html +1 -1
  50. data/doc/Compony/ModelFields/Url.html +1 -1
  51. data/doc/Compony/ModelFields.html +1 -1
  52. data/doc/Compony/ModelMixin.html +1 -1
  53. data/doc/Compony/NaturalOrdering.html +292 -0
  54. data/doc/Compony/RequestContext.html +72 -1
  55. data/doc/Compony/Version.html +1 -1
  56. data/doc/Compony/ViewHelpers.html +1 -1
  57. data/doc/Compony.html +3 -3
  58. data/doc/ComponyController.html +1 -1
  59. data/doc/_index.html +8 -1
  60. data/doc/class_list.html +1 -1
  61. data/doc/file.README.html +73 -16
  62. data/doc/index.html +73 -16
  63. data/doc/method_list.html +100 -100
  64. data/doc/top-level-namespace.html +1 -1
  65. data/lib/compony/component.rb +30 -54
  66. data/lib/compony/components/edit.rb +2 -4
  67. data/lib/compony/components/new.rb +4 -6
  68. data/lib/compony/components/with_form.rb +1 -1
  69. data/lib/compony/model_fields/anchormodel.rb +3 -1
  70. data/lib/compony/natural_ordering.rb +56 -0
  71. data/lib/compony/request_context.rb +8 -0
  72. data/lib/compony.rb +1 -0
  73. metadata +6 -4
@@ -234,6 +234,30 @@
234
234
 
235
235
  <span class="summary_desc"><div class='inline'></div></span>
236
236
 
237
+ </li>
238
+
239
+
240
+ <li class="public ">
241
+ <span class="summary_signature">
242
+
243
+ <a href="#content-instance_method" title="#content (instance method)">#<strong>content</strong>(name) &#x21d2; Object </a>
244
+
245
+
246
+
247
+ </span>
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <span class="summary_desc"><div class='inline'>
258
+ <p>Renders a content block from the current component.</p>
259
+ </div></span>
260
+
237
261
  </li>
238
262
 
239
263
 
@@ -640,6 +664,53 @@
640
664
  </td>
641
665
  </tr>
642
666
  </table>
667
+ </div>
668
+
669
+ <div class="method_details ">
670
+ <h3 class="signature " id="content-instance_method">
671
+
672
+ #<strong>content</strong>(name) &#x21d2; <tt>Object</tt>
673
+
674
+
675
+
676
+
677
+
678
+ </h3><div class="docstring">
679
+ <div class="discussion">
680
+
681
+ <p>Renders a content block from the current component.</p>
682
+
683
+
684
+ </div>
685
+ </div>
686
+ <div class="tags">
687
+
688
+
689
+ </div><table class="source_code">
690
+ <tr>
691
+ <td>
692
+ <pre class="lines">
693
+
694
+
695
+ 46
696
+ 47
697
+ 48
698
+ 49
699
+ 50
700
+ 51</pre>
701
+ </td>
702
+ <td>
703
+ <pre class="code"><span class="info file"># File 'lib/compony/request_context.rb', line 46</span>
704
+
705
+ <span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
706
+ <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
707
+ <span class='id identifier rubyid_content_block'>content_block</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_content_blocks'>content_blocks</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_el'>el</span><span class='op'>|</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span> <span class='op'>||</span> <span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Content block </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> not found in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
708
+ <span class='comment'># A fresh RequestContext is needed due to Rails&#39; buffer
709
+ </span> <span class='id identifier rubyid_concat'>concat</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="" title="Compony::RequestContext (class)">RequestContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Compony::RequestContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_controller'>controller</span><span class='comma'>,</span> <span class='label'>helpers:</span><span class='comma'>,</span> <span class='label'>locals:</span> <span class='id identifier rubyid_local_assigns'>local_assigns</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_content_block'>content_block</span><span class='period'>.</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
710
+ <span class='kw'>end</span></pre>
711
+ </td>
712
+ </tr>
713
+ </table>
643
714
  </div>
644
715
 
645
716
  <div class="method_details ">
@@ -781,7 +852,7 @@
781
852
  </div>
782
853
 
783
854
  <div id="footer">
784
- Generated on Wed Apr 24 17:14:06 2024 by
855
+ Generated on Wed May 29 15:53:00 2024 by
785
856
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
786
857
  0.9.34 (ruby-3.2.2).
787
858
  </div>
@@ -129,7 +129,7 @@
129
129
  </div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Wed Apr 24 17:14:05 2024 by
132
+ Generated on Wed May 29 15:53:00 2024 by
133
133
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
134
  0.9.34 (ruby-3.2.2).
135
135
  </div>
@@ -433,7 +433,7 @@
433
433
  </div>
434
434
 
435
435
  <div id="footer">
436
- Generated on Wed Apr 24 17:14:06 2024 by
436
+ Generated on Wed May 29 15:53:00 2024 by
437
437
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
438
438
  0.9.34 (ruby-3.2.2).
439
439
  </div>
data/doc/Compony.html CHANGED
@@ -79,7 +79,7 @@
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
81
  <dd>lib/compony.rb<span class="defines">,<br />
82
- lib/compony/engine.rb,<br /> lib/compony/version.rb,<br /> lib/compony/component.rb,<br /> lib/compony/model_mixin.rb,<br /> lib/compony/view_helpers.rb,<br /> lib/compony/components/new.rb,<br /> lib/compony/components/edit.rb,<br /> lib/compony/components/form.rb,<br /> lib/compony/request_context.rb,<br /> lib/compony/controller_mixin.rb,<br /> lib/compony/model_fields/url.rb,<br /> lib/compony/components/button.rb,<br /> lib/compony/model_fields/base.rb,<br /> lib/compony/model_fields/date.rb,<br /> lib/compony/model_fields/text.rb,<br /> lib/compony/model_fields/time.rb,<br /> lib/compony/components/destroy.rb,<br /> lib/compony/model_fields/color.rb,<br /> lib/compony/model_fields/email.rb,<br /> lib/compony/model_fields/float.rb,<br /> lib/compony/model_fields/phone.rb,<br /> lib/compony/model_fields/string.rb,<br /> lib/compony/components/with_form.rb,<br /> lib/compony/model_fields/boolean.rb,<br /> lib/compony/model_fields/decimal.rb,<br /> lib/compony/model_fields/integer.rb,<br /> lib/compony/model_fields/currency.rb,<br /> lib/compony/model_fields/datetime.rb,<br /> lib/compony/method_accessible_hash.rb,<br /> lib/compony/model_fields/rich_text.rb,<br /> lib/compony/model_fields/attachment.rb,<br /> lib/compony/model_fields/percentage.rb,<br /> lib/compony/model_fields/anchormodel.rb,<br /> lib/compony/model_fields/association.rb,<br /> lib/compony/component_mixins/resourceful.rb,<br /> lib/compony/component_mixins/default/labelling.rb,<br /> lib/compony/component_mixins/default/standalone.rb,<br /> lib/compony/component_mixins/default/standalone/verb_dsl.rb,<br /> lib/compony/component_mixins/default/standalone/standalone_dsl.rb,<br /> lib/compony/component_mixins/default/standalone/resourceful_verb_dsl.rb</span>
82
+ lib/compony/engine.rb,<br /> lib/compony/version.rb,<br /> lib/compony/component.rb,<br /> lib/compony/model_mixin.rb,<br /> lib/compony/view_helpers.rb,<br /> lib/compony/components/new.rb,<br /> lib/compony/components/edit.rb,<br /> lib/compony/components/form.rb,<br /> lib/compony/request_context.rb,<br /> lib/compony/controller_mixin.rb,<br /> lib/compony/model_fields/url.rb,<br /> lib/compony/natural_ordering.rb,<br /> lib/compony/components/button.rb,<br /> lib/compony/model_fields/base.rb,<br /> lib/compony/model_fields/date.rb,<br /> lib/compony/model_fields/text.rb,<br /> lib/compony/model_fields/time.rb,<br /> lib/compony/components/destroy.rb,<br /> lib/compony/model_fields/color.rb,<br /> lib/compony/model_fields/email.rb,<br /> lib/compony/model_fields/float.rb,<br /> lib/compony/model_fields/phone.rb,<br /> lib/compony/model_fields/string.rb,<br /> lib/compony/components/with_form.rb,<br /> lib/compony/model_fields/boolean.rb,<br /> lib/compony/model_fields/decimal.rb,<br /> lib/compony/model_fields/integer.rb,<br /> lib/compony/model_fields/currency.rb,<br /> lib/compony/model_fields/datetime.rb,<br /> lib/compony/method_accessible_hash.rb,<br /> lib/compony/model_fields/rich_text.rb,<br /> lib/compony/model_fields/attachment.rb,<br /> lib/compony/model_fields/percentage.rb,<br /> lib/compony/model_fields/anchormodel.rb,<br /> lib/compony/model_fields/association.rb,<br /> lib/compony/component_mixins/resourceful.rb,<br /> lib/compony/component_mixins/default/labelling.rb,<br /> lib/compony/component_mixins/default/standalone.rb,<br /> lib/compony/component_mixins/default/standalone/verb_dsl.rb,<br /> lib/compony/component_mixins/default/standalone/standalone_dsl.rb,<br /> lib/compony/component_mixins/default/standalone/resourceful_verb_dsl.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -111,7 +111,7 @@
111
111
 
112
112
 
113
113
 
114
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span>, <span class='object_link'><a href="Compony/Engine.html" title="Compony::Engine (class)">Engine</a></span>, <span class='object_link'><a href="Compony/MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span>, <span class='object_link'><a href="Compony/RequestContext.html" title="Compony::RequestContext (class)">RequestContext</a></span>
114
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span>, <span class='object_link'><a href="Compony/Engine.html" title="Compony::Engine (class)">Engine</a></span>, <span class='object_link'><a href="Compony/MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span>, <span class='object_link'><a href="Compony/NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span>, <span class='object_link'><a href="Compony/RequestContext.html" title="Compony::RequestContext (class)">RequestContext</a></span>
115
115
 
116
116
 
117
117
  </p>
@@ -2146,7 +2146,7 @@
2146
2146
  </div>
2147
2147
 
2148
2148
  <div id="footer">
2149
- Generated on Wed Apr 24 17:14:05 2024 by
2149
+ Generated on Wed May 29 15:53:00 2024 by
2150
2150
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2151
2151
  0.9.34 (ruby-3.2.2).
2152
2152
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Wed Apr 24 17:14:06 2024 by
117
+ Generated on Wed May 29 15:53:00 2024 by
118
118
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.34 (ruby-3.2.2).
120
120
  </div>
data/doc/_index.html CHANGED
@@ -369,6 +369,13 @@
369
369
  <li class="letter">N</li>
370
370
  <ul>
371
371
 
372
+ <li>
373
+ <span class='object_link'><a href="Compony/NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span>
374
+
375
+ <small>(Compony)</small>
376
+
377
+ </li>
378
+
372
379
  <li>
373
380
  <span class='object_link'><a href="Compony/Components/New.html" title="Compony::Components::New (class)">New</a></span>
374
381
 
@@ -559,7 +566,7 @@
559
566
  </div>
560
567
 
561
568
  <div id="footer">
562
- Generated on Wed Apr 24 17:14:04 2024 by
569
+ Generated on Wed May 29 15:52:58 2024 by
563
570
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
564
571
  0.9.34 (ruby-3.2.2).
565
572
  </div>
data/doc/class_list.html CHANGED
@@ -43,7 +43,7 @@
43
43
 
44
44
  <ul id="full_list" class="class">
45
45
  <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
46
- <li id='object_ComponentGenerator' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponentGenerator.html" title="ComponentGenerator (class)">ComponentGenerator</a></span> &lt; NamedBase<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Components' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Components.html" title="Components (module)">Components</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_ComponentsGenerator' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponentsGenerator.html" title="ComponentsGenerator (class)">ComponentsGenerator</a></span> &lt; NamedBase<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Compony' class='odd'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Compony.html" title="Compony (module)">Compony</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Compony::Component' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span> &lt; Object<small class='search_info'>Compony</small></div></li><li id='object_Compony::ComponentMixins' class='collapsed odd'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins.html" title="Compony::ComponentMixins (module)">ComponentMixins</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::ComponentMixins::Default' class='collapsed'><div class='item' style='padding-left:60px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins/Default.html" title="Compony::ComponentMixins::Default (module)">Default</a></span><small class='search_info'>Compony::ComponentMixins</small></div><ul><li id='object_Compony::ComponentMixins::Default::Labelling' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Labelling.html" title="Compony::ComponentMixins::Default::Labelling (module)">Labelling</a></span><small class='search_info'>Compony::ComponentMixins::Default</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone' class='collapsed'><div class='item' style='padding-left:75px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone.html" title="Compony::ComponentMixins::Default::Standalone (module)">Standalone</a></span><small class='search_info'>Compony::ComponentMixins::Default</small></div><ul><li id='object_Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl (class)">ResourcefulVerbDsl</a></span> &lt; VerbDsl<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone::StandaloneDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span> &lt; Base<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone::VerbDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">VerbDsl</a></span> &lt; Base<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li></ul></li></ul></li><li id='object_Compony::ComponentMixins::Resourceful' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ComponentMixins/Resourceful.html" title="Compony::ComponentMixins::Resourceful (module)">Resourceful</a></span><small class='search_info'>Compony::ComponentMixins</small></div></li></ul></li><li id='object_Compony::Components' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/Components.html" title="Compony::Components (module)">Components</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::Components::Button' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Button.html" title="Compony::Components::Button (class)">Button</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Destroy' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Destroy.html" title="Compony::Components::Destroy (class)">Destroy</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Edit' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Edit.html" title="Compony::Components::Edit (class)">Edit</a></span> &lt; WithForm<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Form' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Form.html" title="Compony::Components::Form (class)">Form</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::New' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/New.html" title="Compony::Components::New (class)">New</a></span> &lt; WithForm<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::WithForm' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/WithForm.html" title="Compony::Components::WithForm (class)">WithForm</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li></ul></li><li id='object_Compony::ControllerMixin' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ControllerMixin.html" title="Compony::ControllerMixin (module)">ControllerMixin</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::Engine' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Engine.html" title="Compony::Engine (class)">Engine</a></span> &lt; Engine<small class='search_info'>Compony</small></div></li><li id='object_Compony::MethodAccessibleHash' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span> &lt; Hash<small class='search_info'>Compony</small></div></li><li id='object_Compony::ModelFields' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ModelFields.html" title="Compony::ModelFields (module)">ModelFields</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::ModelFields::Anchormodel' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Anchormodel.html" title="Compony::ModelFields::Anchormodel (class)">Anchormodel</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Association' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Association.html" title="Compony::ModelFields::Association (class)">Association</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Attachment' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Attachment.html" title="Compony::ModelFields::Attachment (class)">Attachment</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Base' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Base.html" title="Compony::ModelFields::Base (class)">Base</a></span> &lt; Object<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Boolean' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Boolean.html" title="Compony::ModelFields::Boolean (class)">Boolean</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Color' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Color.html" title="Compony::ModelFields::Color (class)">Color</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Currency' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Currency.html" title="Compony::ModelFields::Currency (class)">Currency</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Date' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Date.html" title="Compony::ModelFields::Date (class)">Date</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Datetime' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Datetime.html" title="Compony::ModelFields::Datetime (class)">Datetime</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Decimal' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Decimal.html" title="Compony::ModelFields::Decimal (class)">Decimal</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Email' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Email.html" title="Compony::ModelFields::Email (class)">Email</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Float' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Float.html" title="Compony::ModelFields::Float (class)">Float</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Integer' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Integer.html" title="Compony::ModelFields::Integer (class)">Integer</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Percentage' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Percentage.html" title="Compony::ModelFields::Percentage (class)">Percentage</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Phone' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Phone.html" title="Compony::ModelFields::Phone (class)">Phone</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::RichText' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/RichText.html" title="Compony::ModelFields::RichText (class)">RichText</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::String' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/String.html" title="Compony::ModelFields::String (class)">String</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Text' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Text.html" title="Compony::ModelFields::Text (class)">Text</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Time' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Time.html" title="Compony::ModelFields::Time (class)">Time</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Url' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Url.html" title="Compony::ModelFields::Url (class)">Url</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li></ul></li><li id='object_Compony::ModelMixin' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ModelMixin.html" title="Compony::ModelMixin (module)">ModelMixin</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::RequestContext' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/RequestContext.html" title="Compony::RequestContext (class)">RequestContext</a></span> &lt; Base<small class='search_info'>Compony</small></div></li><li id='object_Compony::Version' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Version.html" title="Compony::Version (module)">Version</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::ViewHelpers' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ViewHelpers.html" title="Compony::ViewHelpers (module)">ViewHelpers</a></span><small class='search_info'>Compony</small></div></li></ul></li><li id='object_ComponyController' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponyController.html" title="ComponyController (class)">ComponyController</a></span> &lt; ApplicationController<small class='search_info'>Top Level Namespace</small></div></li>
46
+ <li id='object_ComponentGenerator' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponentGenerator.html" title="ComponentGenerator (class)">ComponentGenerator</a></span> &lt; NamedBase<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Components' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Components.html" title="Components (module)">Components</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_ComponentsGenerator' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponentsGenerator.html" title="ComponentsGenerator (class)">ComponentsGenerator</a></span> &lt; NamedBase<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Compony' class='odd'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Compony.html" title="Compony (module)">Compony</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Compony::Component' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Component.html" title="Compony::Component (class)">Component</a></span> &lt; Object<small class='search_info'>Compony</small></div></li><li id='object_Compony::ComponentMixins' class='collapsed odd'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins.html" title="Compony::ComponentMixins (module)">ComponentMixins</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::ComponentMixins::Default' class='collapsed'><div class='item' style='padding-left:60px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins/Default.html" title="Compony::ComponentMixins::Default (module)">Default</a></span><small class='search_info'>Compony::ComponentMixins</small></div><ul><li id='object_Compony::ComponentMixins::Default::Labelling' class='collapsed'><div class='item' style='padding-left:75px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Labelling.html" title="Compony::ComponentMixins::Default::Labelling (module)">Labelling</a></span><small class='search_info'>Compony::ComponentMixins::Default</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone' class='collapsed'><div class='item' style='padding-left:75px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone.html" title="Compony::ComponentMixins::Default::Standalone (module)">Standalone</a></span><small class='search_info'>Compony::ComponentMixins::Default</small></div><ul><li id='object_Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl (class)">ResourcefulVerbDsl</a></span> &lt; VerbDsl<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone::StandaloneDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span> &lt; Base<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li><li id='object_Compony::ComponentMixins::Default::Standalone::VerbDsl' class='collapsed'><div class='item' style='padding-left:90px'><span class='object_link'><a href="Compony/ComponentMixins/Default/Standalone/VerbDsl.html" title="Compony::ComponentMixins::Default::Standalone::VerbDsl (class)">VerbDsl</a></span> &lt; Base<small class='search_info'>Compony::ComponentMixins::Default::Standalone</small></div></li></ul></li></ul></li><li id='object_Compony::ComponentMixins::Resourceful' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ComponentMixins/Resourceful.html" title="Compony::ComponentMixins::Resourceful (module)">Resourceful</a></span><small class='search_info'>Compony::ComponentMixins</small></div></li></ul></li><li id='object_Compony::Components' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/Components.html" title="Compony::Components (module)">Components</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::Components::Button' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Button.html" title="Compony::Components::Button (class)">Button</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Destroy' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Destroy.html" title="Compony::Components::Destroy (class)">Destroy</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Edit' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Edit.html" title="Compony::Components::Edit (class)">Edit</a></span> &lt; WithForm<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::Form' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/Form.html" title="Compony::Components::Form (class)">Form</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::New' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/New.html" title="Compony::Components::New (class)">New</a></span> &lt; WithForm<small class='search_info'>Compony::Components</small></div></li><li id='object_Compony::Components::WithForm' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/Components/WithForm.html" title="Compony::Components::WithForm (class)">WithForm</a></span> &lt; Component<small class='search_info'>Compony::Components</small></div></li></ul></li><li id='object_Compony::ControllerMixin' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ControllerMixin.html" title="Compony::ControllerMixin (module)">ControllerMixin</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::Engine' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Engine.html" title="Compony::Engine (class)">Engine</a></span> &lt; Engine<small class='search_info'>Compony</small></div></li><li id='object_Compony::MethodAccessibleHash' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/MethodAccessibleHash.html" title="Compony::MethodAccessibleHash (class)">MethodAccessibleHash</a></span> &lt; Hash<small class='search_info'>Compony</small></div></li><li id='object_Compony::ModelFields' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Compony/ModelFields.html" title="Compony::ModelFields (module)">ModelFields</a></span><small class='search_info'>Compony</small></div><ul><li id='object_Compony::ModelFields::Anchormodel' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Anchormodel.html" title="Compony::ModelFields::Anchormodel (class)">Anchormodel</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Association' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Association.html" title="Compony::ModelFields::Association (class)">Association</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Attachment' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Attachment.html" title="Compony::ModelFields::Attachment (class)">Attachment</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Base' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Base.html" title="Compony::ModelFields::Base (class)">Base</a></span> &lt; Object<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Boolean' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Boolean.html" title="Compony::ModelFields::Boolean (class)">Boolean</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Color' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Color.html" title="Compony::ModelFields::Color (class)">Color</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Currency' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Currency.html" title="Compony::ModelFields::Currency (class)">Currency</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Date' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Date.html" title="Compony::ModelFields::Date (class)">Date</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Datetime' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Datetime.html" title="Compony::ModelFields::Datetime (class)">Datetime</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Decimal' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Decimal.html" title="Compony::ModelFields::Decimal (class)">Decimal</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Email' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Email.html" title="Compony::ModelFields::Email (class)">Email</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Float' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Float.html" title="Compony::ModelFields::Float (class)">Float</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Integer' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Integer.html" title="Compony::ModelFields::Integer (class)">Integer</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Percentage' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Percentage.html" title="Compony::ModelFields::Percentage (class)">Percentage</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Phone' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Phone.html" title="Compony::ModelFields::Phone (class)">Phone</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::RichText' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/RichText.html" title="Compony::ModelFields::RichText (class)">RichText</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::String' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/String.html" title="Compony::ModelFields::String (class)">String</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Text' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Text.html" title="Compony::ModelFields::Text (class)">Text</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Time' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Time.html" title="Compony::ModelFields::Time (class)">Time</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li><li id='object_Compony::ModelFields::Url' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Compony/ModelFields/Url.html" title="Compony::ModelFields::Url (class)">Url</a></span> &lt; Base<small class='search_info'>Compony::ModelFields</small></div></li></ul></li><li id='object_Compony::ModelMixin' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ModelMixin.html" title="Compony::ModelMixin (module)">ModelMixin</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::NaturalOrdering' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/NaturalOrdering.html" title="Compony::NaturalOrdering (class)">NaturalOrdering</a></span> &lt; Array<small class='search_info'>Compony</small></div></li><li id='object_Compony::RequestContext' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/RequestContext.html" title="Compony::RequestContext (class)">RequestContext</a></span> &lt; Base<small class='search_info'>Compony</small></div></li><li id='object_Compony::Version' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/Version.html" title="Compony::Version (module)">Version</a></span><small class='search_info'>Compony</small></div></li><li id='object_Compony::ViewHelpers' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Compony/ViewHelpers.html" title="Compony::ViewHelpers (module)">ViewHelpers</a></span><small class='search_info'>Compony</small></div></li></ul></li><li id='object_ComponyController' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ComponyController.html" title="ComponyController (class)">ComponyController</a></span> &lt; ApplicationController<small class='search_info'>Top Level Namespace</small></div></li>
47
47
 
48
48
  </ul>
49
49
  </div>
data/doc/file.README.html CHANGED
@@ -87,7 +87,7 @@
87
87
  </li><li>
88
88
  <p>Compony is built for Rails 7 and fully supports Stimulus and Turbo Drive. Turbo Frames and Streams are not yet targeted, so Compony is currently meant for websites where every click triggers a “full page load” (in quotes because they are not actually full page loads due to Turbo Drive).</p>
89
89
  </li><li>
90
- <p>Compony uses CanCanCan (<a href="https://github.com/CanCanCommunity/cancancan">github.com/CanCanCommunity/cancancan</a>) for authorization but does not provide an authentication mechanism. You can easily build your own by creating login/logout components that manage cookies, and configure Compony to enforce authentication using the <code>Compony.authentication_before_action</code> setter.</p>
90
+ <p>Compony uses <a href="https://github.com/CanCanCommunity/cancancan">CanCanCan</a> for authorization but does not provide an authentication mechanism. You can easily build your own by creating login/logout components that manage cookies, and configure Compony to enforce authentication using the <code>Compony.authentication_before_action</code> setter. We have also successfully tested Compony to work with <a href="https://github.com/heartcombo/devise">Devise</a>.</p>
91
91
  </li></ul>
92
92
 
93
93
  <h2 id="label-State+of+the+project">State of the project</h2>
@@ -311,6 +311,10 @@
311
311
 
312
312
  <p>Note how the admin’s delete button is disabled due to the feasibility framework. Pointing the mouse at it causes a tooltip saying: “Cannot destroy admins.”, as specified in the model’s prevention.</p>
313
313
 
314
+ <h1 id="label-Related+projects">Related projects</h1>
315
+
316
+ <p>A project with a similar aim, but a different approach, is <a href="https://github.com/phlex-ruby/phlex">Phlex</a>.</p>
317
+
314
318
  <h1 id="label-Installation">Installation</h1>
315
319
 
316
320
  <h2 id="label-Installing+Compony">Installing Compony</h2>
@@ -473,32 +477,87 @@
473
477
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
474
478
  <span class='id identifier rubyid_label'>label</span><span class='lparen'>(</span><span class='symbol'>:all</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
475
479
  <span class='id identifier rubyid_content'>content</span> <span class='kw'>do</span>
476
- <span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome to my basic component</span><span class='tstring_end'>&#39;</span></span>
480
+ <span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome to my basic component.</span><span class='tstring_end'>&#39;</span></span>
477
481
  <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>It&#39;s not much, but it&#39;s honest work.</span><span class='tstring_end'>&quot;</span></span>
478
482
  <span class='kw'>end</span>
479
483
  <span class='kw'>end</span>
480
484
  </code></pre>
481
485
 
482
- <p>If a subclass component calls <code>content</code>, it overwrites the block of the parent class, replacing the entire content. To make overwriting more granular, you can use <code>add_content</code> instead of <code>content</code>. This method can be called multiple times to create an array of content. If no argument is specified, the new content is placed at the bottom. Otherwise, it is inserted at the indicated position. Example:</p>
486
+ <h5 id="label-Naming+content+blocks-2C+ordering+and+overriding+them+in+subclasses">Naming content blocks, ordering and overriding them in subclasses</h5>
487
+
488
+ <p>Content blocks are actually named. The <code>content</code> call adds or replaces a previously defined content block, e.g. in an earlier call to <code>setup</code> in a component’s superclass. When calling <code>content</code> without a name, it defaults to <code>main</code> and will overwrite any previous <code>main</code> content. However, you can provide your own name and refer to other names by using the <code>before:</code> keyword.</p>
483
489
 
484
490
  <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
485
- <span class='id identifier rubyid_content'>content</span> <span class='kw'>do</span>
486
- <span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome to my basic component</span><span class='tstring_end'>&#39;</span></span>
491
+ <span class='id identifier rubyid_content'>content</span> <span class='kw'>do</span> <span class='comment'># will become :main
492
+ </span> <span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome to my basic component.</span><span class='tstring_end'>&#39;</span></span>
487
493
  <span class='kw'>end</span>
488
- <span class='id identifier rubyid_add_content'>add_content</span> <span class='kw'>do</span>
494
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:thanks</span> <span class='kw'>do</span>
489
495
  <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Thank you and see you tomorrow.</span><span class='tstring_end'>&#39;</span></span>
490
496
  <span class='kw'>end</span>
491
- <span class='id identifier rubyid_add_content'>add_content</span> <span class='int'>1</span> <span class='kw'>do</span>
497
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:middle</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='symbol'>:thanks</span> <span class='kw'>do</span>
492
498
  <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>This paragraph is inserted between the others.</span><span class='tstring_end'>&#39;</span></span>
493
499
  <span class='kw'>end</span>
500
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:thanks</span> <span class='kw'>do</span>
501
+ <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Thank you and see you tonight.</span><span class='tstring_end'>&#39;</span></span> <span class='comment'># this overwrites &quot;Thank you and see you tomorrow.&quot;
502
+ </span> <span class='kw'>end</span>
503
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:first</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='symbol'>:main</span> <span class='kw'>do</span>
504
+ <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>This appears first.</span><span class='tstring_end'>&#39;</span></span>
505
+ <span class='kw'>end</span>
494
506
  <span class='kw'>end</span>
495
507
  </code></pre>
496
508
 
497
- <p>The result is the h1 with index 0, then the paragraph reading This paragraph…” with index 1, and finally Thank you…” with index 2.</p>
509
+ <p>This results in: - This appears first. - Welcome to my basic component. - This paragraph is inserted between the others. - Thank you and see you tonight.</p>
510
+
511
+ <p>As you see, overusing this feature can lead to messy code as it becomes unclear what happens in what order. For this reason, this feature should only be used to decouple the content of your abstract components for allowing surgical overrides in subclasses.</p>
512
+
513
+ <p>It is a good convention to always have one content block named <code>:main</code>, as you might want to refer to it in subclasses.</p>
514
+
515
+ <h5 id="label-Nesting+content+blocks-2C+calling+a+content+block+from+another">Nesting content blocks, calling a content block from another</h5>
516
+
517
+ <p>In some situations, such as in forms, it can be useful to nest content blocks. This will also allow subclasses to override a wrapper while keeping the content, and vice versa. To make this possible, you can also use the <code>content</code> keyword inside a content block. Note that unlike the call in <code>setup</code>, this call will render a content block instead of defining it. This happens inside the request context and the content block must be defined inside the current component.</p>
518
+
519
+ <p>Note that you cannot call another component’s content block this way.</p>
520
+
521
+ <p>Here is an example on how to use this feature, e.g. to create a bootstrap card that can be overridden with precision:</p>
522
+
523
+ <pre class="code ruby"><code class="ruby"><span class='comment'># Components::Bootstrap::Card
524
+ </span><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
525
+ <span class='id identifier rubyid_content'>content</span> <span class='label'>hidden:</span> <span class='kw'>true</span> <span class='kw'>do</span> <span class='comment'># hidden: true will cause `render` to skip this content block. You can still use it in the nested fashion.
526
+ </span> <span class='id identifier rubyid_div'>div</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>I am the default content for the card</span><span class='tstring_end'>&#39;</span></span>
527
+ <span class='kw'>end</span>
528
+
529
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:card</span> <span class='kw'>do</span>
530
+ <span class='id identifier rubyid_div'>div</span> <span class='label'>class:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>card card-body</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span>
531
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:main</span>
532
+ <span class='kw'>end</span>
533
+ <span class='kw'>end</span>
534
+ <span class='kw'>end</span>
535
+ </code></pre>
536
+
537
+ <p>The output is:</p>
538
+
539
+ <pre class="code ruby"><code class="ruby">&lt;div class=&quot;card card-body&quot;&gt;&lt;div&gt;I am the default content for the card&lt;/div&gt;&lt;/div&gt;
540
+ </code></pre>
541
+
542
+ <p>So when you subclass this component, you can forget about the card and just overwrite <code>:main</code> as follows:</p>
543
+
544
+ <pre class="code ruby"><code class="ruby"><span class='comment'># Components::Hello::HelloCard &lt; Components::Bootstrap::Card
545
+ </span><span class='id identifier rubyid_setup'>setup</span> <span class='kw'>do</span>
546
+ <span class='id identifier rubyid_content'>content</span> <span class='kw'>do</span> <span class='comment'># hidden is still true because the old :main content block specified that already.
547
+ </span> <span class='id identifier rubyid_h1'>h1</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Hello</span><span class='tstring_end'>&#39;</span></span>
548
+ <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Welcome to my site.</span><span class='tstring_end'>&#39;</span></span>
549
+ <span class='kw'>end</span>
550
+ <span class='kw'>end</span>
551
+ </code></pre>
552
+
553
+ <p>The output is:</p>
554
+
555
+ <pre class="code ruby"><code class="ruby">&lt;div class=&quot;card card-body&quot;&gt;&lt;h1&gt;Hello&lt;/h1&gt;&lt;p&gt;Welcome to my site.&lt;/p&gt;&lt;/div&gt;
556
+ </code></pre>
498
557
 
499
558
  <h4 id="label-Redirecting+away+-2F+Intercepting+rendering">Redirecting away / Intercepting rendering</h4>
500
559
 
501
- <p>Immediately before the <code>content</code> block(s) are evaluated, another block is evaluated if present: <code>before_render</code>. If this block creates a reponse body in the Rails controller, the content blocks are skipped.</p>
560
+ <p>Immediately before the <code>content</code> block(s) are evaluated, another chain of blocks is evaluated if present: <code>before_render</code>. If on of these blocks creates a reponse body in the Rails controller, the subsequent <code>before_render</code> blocks and all <code>content</code> blocks are skipped.</p>
502
561
 
503
562
  <p>This is useful for redirecting. Here is an example of a component that provides a restaurant’s lunch menu, but redirects to the menu overview page instead if it’s not lunch time:</p>
504
563
 
@@ -520,6 +579,8 @@
520
579
  <span class='kw'>end</span>
521
580
  </code></pre>
522
581
 
582
+ <p>Similarly to <code>content</code>, the <code>before_render</code> method also accepts a name, defaulting to <code>:main</code>, as well as a <code>before:</code> keyword. This allows you to selectively extend and/or override <code>before_render</code> blocks in subclasses.</p>
583
+
523
584
  <h2 id="label-Standalone">Standalone</h2>
524
585
 
525
586
  <p>As stated earlier, Compony can generate routes to your components. This is achieved by using the standalone DSL inside the setup block. The first step is calling the method <code>standalone</code> with a path. Inside this block, you will then specify which HTTP verbs (e.g. GET, PATCH etc.) the component should listen to. As soon as both are specified, Compony will generate an appropriate route.</p>
@@ -657,7 +718,7 @@
657
718
  <span class='id identifier rubyid_standalone'>standalone</span> <span class='kw'>do</span>
658
719
  <span class='id identifier rubyid_layout'>layout</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dark</span><span class='tstring_end'>&#39;</span></span>
659
720
  <span class='kw'>end</span>
660
- <span class='id identifier rubyid_add_content'>add_content</span> <span class='kw'>do</span>
721
+ <span class='id identifier rubyid_content'>content</span> <span class='symbol'>:below</span> <span class='kw'>do</span>
661
722
  <span class='id identifier rubyid_para'>para</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>This will appear below &quot;Test&quot;.</span><span class='tstring_end'>&#39;</span></span>
662
723
  <span class='kw'>end</span>
663
724
  <span class='kw'>end</span>
@@ -1397,7 +1458,7 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1397
1458
 
1398
1459
  <p>This component follows the resourceful lifecycle, explained in above under “Resourceful”. <code>load_data</code> is set to create a new record and <code>store_data</code> attempts to create it. Parameters are validated in <code>assign_attributes</code> using a Schemacop schema that is generated from the form. The schema corresponds to Rail’s typical strong parameter structure for forms. For example, a user’s New component would look for a parameter <code>user</code> holding a hash of attributes (e.g. <code>user[first_name]=Tom</code>).</p>
1399
1460
 
1400
- <p>In case you overwrite <code>store_data</code>, make sure to set <code>@created_succeeded</code> to true if storing was successful (and to set it to false otherwise).</p>
1461
+ <p>In case you overwrite <code>store_data</code>, make sure to set <code>@create_succeeded</code> to true if storing was successful (and to set it to false otherwise).</p>
1401
1462
 
1402
1463
  <p>The following DSL calls are implemented to allow for convenient overrides of default logic:</p>
1403
1464
  <ul><li>
@@ -1525,10 +1586,6 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1525
1586
  <ul><li>
1526
1587
  <p>The API is not yet as consistent as I’d like it. Examples:</p>
1527
1588
  </li><li>
1528
- <p><code>content</code> replaces the content and <code>add_content</code> inserts some, but for actions the insertion is called <code>action</code>.</p>
1529
- </li><li>
1530
- <p>Every DSL call, in particular nested ones, should be able to insert and/or override a precise call in the parent class. Override behavior should be made consistent across the entire Compony DSL. For instance, it makes no sense that <code>add_content</code> uses an index while <code>action</code> uses <code>before</code> with a keyword.</p>
1531
- </li><li>
1532
1589
  <p>Instead of <code>skip_...</code> methods, <code>remove_...</code> should be implemented. This allows yet another level of classes to re-add properties. Skipping should be kept for options given via the constructor.</p>
1533
1590
  </li><li>
1534
1591
  <p>Change resourceful hooks as follows:</p>
@@ -1555,7 +1612,7 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1555
1612
  </div></div>
1556
1613
 
1557
1614
  <div id="footer">
1558
- Generated on Wed Apr 24 17:14:05 2024 by
1615
+ Generated on Wed May 29 15:53:00 2024 by
1559
1616
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1560
1617
  0.9.34 (ruby-3.2.2).
1561
1618
  </div>