The discussion revolves around adding a mixin to a class in a Discourse plugin. shoshber is trying to modify the create-account controller by adding a mixin called FooValidation but is unsure of the best approach. Osama suggests using PluginApi.modifyClass with the mixin as an argument, which shoshber confirms works. For a sample code reference, merefield shares an example from the Topic List Previews plugin where they use modifyClass to add a mixin to a component, demonstrating how to break out shared code and avoid repetition.
I could just add the relevant properties/methods to the create account controller using PluginApi.modifyClass, but that doesn’t feel right, especially seeing as I’ll want to reuse the mixin.