Closed timoschilling closed 11 years ago
Hmmm. I'm gonna think about this: the library right now is REALLY SIMPLE and adding a class << self
kinda makes me want to cry ;)
true class << self
is not nice, but clear and init ar tow different thinks.
What are the other options?
The other option is to leave it as it is.
What's about RequestStore.init_or_clear
?
Then we don't have the Thread.current[:request_store] = {}
in the middelware and only one method and don't need to use class << self; alias ...
One other argument for an internal init way is, (i plan a new pull request for that) to configure the internal store, so that the developer can change it.
Closed in favor of #7.
i think it is a better way to handle the init/clear functionality in the RequestStore module