I've been trying to store a persistent instance of a class in my padrino controller, but am having some headaches. I'm currently just storing it as a class variable, but I'm getting warnings that looks like:
warning: class variable access from toplevel
I tried looking up solutions to this online, but they involve class methods such as class_variable_set or class_eval, neither of which the controller has (Though it has the instance equivalents interestingly enough). Am I trying to do something that shouldn't be done? How can I keep a persistent instance of the class? I need to do so b/c the class hits an online DB and caches stuff quite often.