ruby-geonames
ruby-geonames copied to clipboard
Initialization
Hello,
I love this Gem. The only issue I have is that I can't initialize the configuration in a Rails app because of the way you are storing the config in a Thread.current. I had to monkey patch it to store the config in a global variable. Otherwise, I would have to configure it before each call.
This is how I would change the config method in geonames.rb:
def config
$config ||= Geonames::Config.new
end
Any thoughts?
Thanks for such a cool Gem!