Flowdock
method

resolve_string_connection

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Resolver

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

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.