fix database_config
This commit is contained in:
parent
34e238466f
commit
5cbe8dd968
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ class FoodsoftConfig
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_database
|
def setup_database
|
||||||
database_config = ActiveRecord::Base.configurations[Rails.env]
|
database_config = ActiveRecord::Base.configurations.find_db_config(Rails.env).configuration_hash
|
||||||
database_config = database_config.merge(config[:database]) if config[:database].present?
|
database_config = database_config.merge(config[:database]) if config[:database].present?
|
||||||
ActiveRecord::Base.establish_connection(database_config)
|
ActiveRecord::Base.establish_connection(database_config)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue