diff --git a/lib/geocoder.rb b/lib/geocoder.rb index 9be0c2c7371fd6d1b8c603134c6ef069ea255fa9..120cffbfd72f6bd7e6e3215ab47e82973790e9b2 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -67,7 +67,8 @@ module Geocoder if valid_lookups.include?(name) name = name.to_s require "geocoder/lookups/#{name}" - eval("Geocoder::Lookup::#{name[0...1].upcase + name[1..-1]}.new") + klass = name.split("_").map{ |i| i[0...1].upcase + i[1..-1] }.join + eval("Geocoder::Lookup::#{klass}.new") else valids = valid_lookups.map{ |l| ":#{l}" }.join(", ") raise ConfigurationError, "Please specify a valid lookup for Geocoder " +