diff options
author | George Claghorn <george.claghorn@gmail.com> | 2018-08-06 22:23:47 -0400 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2018-08-06 22:23:47 -0400 |
commit | 79573b3afffafc070ec1eecf8c47678bbdae60c7 (patch) | |
tree | d2a41b4463b0251bc123a4a56c616d87a6605573 /activestorage | |
parent | 1ed33a2a64f09182287c4bb283e574aad959126f (diff) | |
download | rails-79573b3afffafc070ec1eecf8c47678bbdae60c7.tar.gz rails-79573b3afffafc070ec1eecf8c47678bbdae60c7.tar.bz2 rails-79573b3afffafc070ec1eecf8c47678bbdae60c7.zip |
Camelize instead of classifying
Avoid mangling service names that end in S:
"GCS".classify # => "GC"
"GCS".camelize # => "GCS"
Diffstat (limited to 'activestorage')
-rw-r--r-- | activestorage/lib/active_storage/service/configurator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/lib/active_storage/service/configurator.rb b/activestorage/lib/active_storage/service/configurator.rb index 32fa9105c6..fa80c66c3b 100644 --- a/activestorage/lib/active_storage/service/configurator.rb +++ b/activestorage/lib/active_storage/service/configurator.rb @@ -26,7 +26,7 @@ module ActiveStorage def resolve(class_name) require "active_storage/service/#{class_name.to_s.underscore}_service" - ActiveStorage::Service.const_get(:"#{class_name.classify}Service") + ActiveStorage::Service.const_get(:"#{class_name.camelize}Service") rescue LoadError raise "Missing service adapter for #{class_name.inspect}" end |