Flowdock
method

resolve_string_connection

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: Resolver
resolve_string_connection(spec) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/connection_specification.rb, line 219
        def resolve_string_connection(spec)
          # Rails has historically accepted a string to mean either
          # an environment key or a URL spec, so we have deprecated
          # this ambiguous behaviour and in the future this function
          # can be removed in favor of resolve_url_connection.
          if configurations.key?(spec) || spec !~ /:/
            ActiveSupport::Deprecation.warn(              Passing a string to ActiveRecord::Base.establish_connection for a              configuration lookup is deprecated, please pass a symbol              (#{spec.to_sym.inspect}) instead..squish)

            resolve_symbol_connection(spec)
          else
            resolve_url_connection(spec)
          end
        end
Register or log in to add new notes.