提交 1dac2edb 编写于 作者: P Piotr Sarnacki

Use env == 'development' instead of env.development?

It's simpler to assume that passed env is just a string without any
extensions, especially when DatabaseTasks are intended to be used also
without rails.
上级 b5ae43a4
...@@ -175,7 +175,7 @@ def class_for_adapter(adapter) ...@@ -175,7 +175,7 @@ def class_for_adapter(adapter)
def each_current_configuration(environment) def each_current_configuration(environment)
environments = [environment] environments = [environment]
environments << 'test' if environment.development? environments << 'test' if environment == 'development'
configurations = ActiveRecord::Base.configurations.values_at(*environments) configurations = ActiveRecord::Base.configurations.values_at(*environments)
configurations.compact.each do |configuration| configurations.compact.each do |configuration|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册