I’ve got a problem that’s been nagging at me for about a year now.
Every now and again I end up being burned by it. I’ve never seen
mention of it, and I can’t find anything using google (wrong words
Anyway. Say you have some data specifically related to a controller
that you want initialised. Ideally this data would be specified in
that controller. Now let’s say that other controller/views that
provide links to the first controller need to know this information
to act rationally. The trouble is that the first controller is not
loaded until a user does something that requires it.
I have been unsuccessful at getting the controller to load through
any coding ‘action’. Makes me think I haven’t come across the way
No luck with require_dependency… it leaves constants unexpectedly
I have ended up sending an HTTP request at start up to the
controller. This works, but surely there’s a better way?