Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Use Extlib::Inflections.camelize to convert the adapter name into a c…
Browse files Browse the repository at this point in the history
…lass name

* Extlib::Inflections.classify singularizes the adaper name, which can
  incorrectly strip a trailing "s" from the adapter name, eg: redis => Redi

[#890 state:resolved]
  • Loading branch information
dkubb committed Jun 7, 2009
1 parent 109e6d4 commit 7429143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dm-core.rb
Expand Up @@ -176,7 +176,7 @@ def self.setup(*args)
options = normalize_options(uri_or_options)

adapter_name = options[:adapter]
class_name = (Extlib::Inflection.classify(adapter_name) + 'Adapter').to_sym
class_name = (Extlib::Inflection.camelize(adapter_name) + 'Adapter').to_sym

unless Adapters.const_defined?(class_name)
lib_name = "#{adapter_name}_adapter"
Expand Down

0 comments on commit 7429143

Please sign in to comment.