Closed agrberg closed 8 years ago
I'd happily add tests for this but I cannot get the tests to run locally without a number of failures out of the box. I believe I do not have the test env configured correctly but I only have time to look into it more in depth later.
I just updated the docs with how Rails lets Twelve-Factor configuration win for ActiveRecord::Base and SecondBase. Please check it out. https://github.com/customink/secondbase/blob/master/README.md#twelve-factor--database_url
We prefer this technique vs adding ENV vars to SecondBase itself.
This is another link on the topic. https://github.com/rails/rails/commit/5b96027ef6ac6e507ec9caf9973069345ce6a7cd
👍 Did not know about that option! Thanks and I'll close this as I can get exactly what I need with that approach.
Thanks too! I needed this reminder to get those docs in place. Really appreciate you bringing up the topic. Cheers!
This is modeled after how ActiveRecord gives priority to a
ENV['DATABASE_URL]
connection. It allows the same flexibility of not having your production credentials in yourdatabase.yml
file.