method

with_temporary_pool_for_each

rails latest stable - Class: ActiveRecord::Tasks::DatabaseTasks

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

with_temporary_pool_for_each(env: ActiveRecord::Tasks::DatabaseTasks.env, name: nil, clobber: false, &block)
public

No documentation available.

# File activerecord/lib/active_record/tasks/database_tasks.rb, line 520
      def with_temporary_pool_for_each(env: ActiveRecord::Tasks::DatabaseTasks.env, name: nil, clobber: false, &block) # :nodoc:
        if name
          db_config = ActiveRecord::Base.configurations.configs_for(env_name: env, name: name)
          with_temporary_pool(db_config, clobber: clobber, &block)
        else
          ActiveRecord::Base.configurations.configs_for(env_name: env, name: name).each do |db_config|
            with_temporary_pool(db_config, clobber: clobber, &block)
          end
        end
      end