method

each_current_configuration

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: DatabaseTasks
each_current_configuration(environment, spec_name = nil) 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/tasks/database_tasks.rb, line 471
        def each_current_configuration(environment, spec_name = nil)
          environments = [environment]
          environments << "test" if environment == "development"

          environments.each do |env|
            ActiveRecord::Base.configurations.configs_for(env_name: env).each do |db_config|
              next if spec_name && spec_name != db_config.spec_name

              yield db_config.config, db_config.spec_name, env
            end
          end
        end
Register or log in to add new notes.