Documentation: Injecting In Your Models

Is this still correct in the documentation?
https://coldbox.ortusbooks.com/the-basics/layouts-and-views#injecting-in-your-models

The renderer became singleton, but is says: renderer is a transient object.

Hey, @gunnar.lieb !

Youā€™re definitely right - the Renderer became a singleton in ColdBox 6. So that part of the documentation is only correct for CB5 and below.

Could I trouble you to click ā€œEdit in Githubā€ in the docs sidebar, and remove the two sentences referencing ā€œtransientā€ in that docs page? Itā€™s super easy to update the docs directly from Github that way, and the more members we can get to keep the docs maintained, the more accurate they will be for everyone.

Iā€™m not sure if injecting the Renderer into a model changed in CB6 or notā€¦ I havenā€™t tried it out, but Iā€™d guess you can simply do inject="coldbox:Renderer" instead of using the provider syntax. @bdw429s would you know? Does that provider section need to be dropped from the CB6 docs for injecting a Renderer into a model?

I would guess in Coldbox 6 you can just remove the provider namespace. Of course, it isnā€™t hurting anything being there. So far as I know, the coldbox:Renderer namespace is still the same.

I updated that docs page for CB6, FYI.

1 Like