compony 0.6.4 → 0.7.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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +6 -0
  5. data/VERSION +1 -1
  6. data/compony.gemspec +3 -3
  7. data/doc/ComponentGenerator.html +1 -1
  8. data/doc/Components.html +1 -1
  9. data/doc/ComponentsGenerator.html +1 -1
  10. data/doc/Compony/Component.html +247 -156
  11. data/doc/Compony/ComponentMixins/Default/Labelling.html +1 -1
  12. data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +1 -1
  13. data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +1 -1
  14. data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +1 -1
  15. data/doc/Compony/ComponentMixins/Default/Standalone.html +1 -1
  16. data/doc/Compony/ComponentMixins/Default.html +1 -1
  17. data/doc/Compony/ComponentMixins/Resourceful.html +1 -1
  18. data/doc/Compony/ComponentMixins.html +1 -1
  19. data/doc/Compony/Components/Button.html +2 -2
  20. data/doc/Compony/Components/Destroy.html +2 -2
  21. data/doc/Compony/Components/Edit.html +2 -2
  22. data/doc/Compony/Components/Form.html +2 -2
  23. data/doc/Compony/Components/Index.html +2 -2
  24. data/doc/Compony/Components/List.html +2 -2
  25. data/doc/Compony/Components/New.html +2 -2
  26. data/doc/Compony/Components/Show.html +2 -2
  27. data/doc/Compony/Components/WithForm.html +19 -21
  28. data/doc/Compony/Components.html +1 -1
  29. data/doc/Compony/ControllerMixin.html +1 -1
  30. data/doc/Compony/Engine.html +1 -1
  31. data/doc/Compony/MethodAccessibleHash.html +1 -1
  32. data/doc/Compony/ModelFields/Anchormodel.html +1 -1
  33. data/doc/Compony/ModelFields/Association.html +1 -1
  34. data/doc/Compony/ModelFields/Attachment.html +1 -1
  35. data/doc/Compony/ModelFields/Base.html +1 -1
  36. data/doc/Compony/ModelFields/Boolean.html +1 -1
  37. data/doc/Compony/ModelFields/Color.html +1 -1
  38. data/doc/Compony/ModelFields/Currency.html +1 -1
  39. data/doc/Compony/ModelFields/Date.html +1 -1
  40. data/doc/Compony/ModelFields/Datetime.html +1 -1
  41. data/doc/Compony/ModelFields/Decimal.html +1 -1
  42. data/doc/Compony/ModelFields/Email.html +1 -1
  43. data/doc/Compony/ModelFields/Float.html +1 -1
  44. data/doc/Compony/ModelFields/Integer.html +1 -1
  45. data/doc/Compony/ModelFields/Percentage.html +1 -1
  46. data/doc/Compony/ModelFields/Phone.html +1 -1
  47. data/doc/Compony/ModelFields/RichText.html +1 -1
  48. data/doc/Compony/ModelFields/String.html +1 -1
  49. data/doc/Compony/ModelFields/Text.html +1 -1
  50. data/doc/Compony/ModelFields/Time.html +1 -1
  51. data/doc/Compony/ModelFields/Url.html +1 -1
  52. data/doc/Compony/ModelFields.html +1 -1
  53. data/doc/Compony/ModelMixin.html +1 -1
  54. data/doc/Compony/NaturalOrdering.html +1 -1
  55. data/doc/Compony/RequestContext.html +1 -1
  56. data/doc/Compony/Version.html +1 -1
  57. data/doc/Compony/ViewHelpers.html +1 -1
  58. data/doc/Compony.html +44 -42
  59. data/doc/ComponyController.html +1 -1
  60. data/doc/_index.html +1 -1
  61. data/doc/file.README.html +7 -1
  62. data/doc/index.html +7 -1
  63. data/doc/method_list.html +109 -101
  64. data/doc/top-level-namespace.html +1 -1
  65. data/lib/compony/component.rb +30 -8
  66. data/lib/compony/components/with_form.rb +1 -2
  67. data/lib/compony.rb +9 -8
  68. metadata +2 -2
data/doc/index.html CHANGED
@@ -1075,6 +1075,12 @@ The number 8 has the binary form 1000. Enter a number and press ENTER: [8]
1075
1075
 
1076
1076
  <p>Note that the generated paths in the example are just for illustration purposes. The paths point to whatever path you configure in the target component’s default standalone config. Also, this example is not how you should generate links to components, as is explained in the next subsection.</p>
1077
1077
 
1078
+ <h4 id="label-Customizing+path+generation">Customizing path generation</h4>
1079
+
1080
+ <p>By implementing <code>path do ... end</code> inside the <code>setup</code> method of a component, you can override the way paths to that component are generated. Customizing the path generation will affect all mentioned methods mentioned here involving paths, such as <code>Compony.path</code>, <code>compony_link</code>, <code>Compony.button</code>, <code>compony_button</code> etc.</p>
1081
+
1082
+ <p>This is an advanced usage. Refer to the default implementation of <code>Component</code>‘s <code>path_block</code> to see an exmple.</p>
1083
+
1078
1084
  <h3 id="label-Generating+a+link+to+a+component">Generating a link to a component</h3>
1079
1085
 
1080
1086
  <p>In order to allow a user to visit another component, don’t implement your links and buttons manually. Instead, use Compony’s links and buttons, as those extract information from the target component, avoiding redundant code and making refactoring much easier.</p>
@@ -1779,7 +1785,7 @@ my_button = Compony.button(:index, :users, enabled: -&gt; { |controller| control
1779
1785
  </div></div>
1780
1786
 
1781
1787
  <div id="footer">
1782
- Generated on Mon Nov 10 13:15:56 2025 by
1788
+ Generated on Fri Nov 14 15:08:14 2025 by
1783
1789
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1784
1790
  0.9.34 (ruby-3.3.5).
1785
1791
  </div>