On Sep 9, 4:10 pm, Robert Walker <[email protected]> wrote: > Nathan Beyer wrote: > > I have a trivial Singleton class in my 'lib' folder, which has some > > instance variables that I setup by calling a configure method from an > > initializer. The initializer seems to execute just fine and sets up > > the singleton instance. However, when I reference that same singleton > > instance in a controller later, the instance variables are all nil, as > > though the class was reloaded. > > http://code.google.com/p/google-singleton-detector/wiki/WhySingletons... > > Sorry, all I have to say about the subject.
Any suggestions on an alternative approach? I'm open to do anything that works. My use case is an Authentication adapter library. I want to load the configuration once and construct the configured adapter once and then use it again and again. I want something akin to how Rails/ActiveRecord configure database adapter. Thoughts? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

