Skip to content

Commit

Permalink
Merge 297aba9 into 2896ea4
Browse files Browse the repository at this point in the history
  • Loading branch information
rusterholz committed Jul 27, 2015
2 parents 2896ea4 + 297aba9 commit fb83c6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/geokit-rails/acts_as_mappable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ module ClassMethods
# A proxy to an instance of a finder adapter, inferred from the connection's adapter.
def adapter
@adapter ||= begin
require File.join('geokit-rails', 'adapters', connection.adapter_name.downcase)
unless Adapters.const_defined?(connection.adapter_name.camelcase)
filename = connection.adapter_name.downcase
require File.join("geokit-rails", "adapters", filename)
end
klass = Adapters.const_get(connection.adapter_name.camelcase)
klass.load(self) unless klass.loaded
klass.new(self)
Expand Down

0 comments on commit fb83c6d

Please sign in to comment.