module ActiveRecord::Tasks::DatabaseTasks

Public Instance Methods

each_current_configuration(environment, spec_name = nil) { |stringify_keys| ... } click to toggle source
# File lib/active_record/migrations/tasks.rb, line 43
def each_current_configuration(environment, spec_name = nil)
        unless configuration = ActiveRecord::Base.configurations[environment]
                raise ArgumentError.new("Cannot find configuration for environment #{environment.inspect} in #{ActiveRecord::Base.configurations.keys}")
        end
        
        # This is a hack because DatabaseTasks functionality uses string for keys.
        yield configuration.stringify_keys
end