Skip to content

Instantly share code, notes, and snippets.

@jancel
Created January 12, 2024 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jancel/ff55b3d0d6d6c4ddbc60e3644938c5f0 to your computer and use it in GitHub Desktop.
Save jancel/ff55b3d0d6d6c4ddbc60e3644938c5f0 to your computer and use it in GitHub Desktop.
Rails Database.yml Example with Rails.credentials
default: &default
adapter: postgresql
encoding: unicode
url: <%= ENV.fetch('DATABASE_URL') { Rails.application.credentials.database_url } %>
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
"<%= Rails.env %>":
<<: *default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment