Skip to content

Instantly share code, notes, and snippets.

View jlthai's full-sized avatar
🔥

Jimmy Le Thai jlthai

🔥
  • Batch
  • Saint Augustine, Fl
  • X @jlthai
View GitHub Profile
@jlthai
jlthai / app_config.rb
Last active January 28, 2019 19:21
Quick way to use ENVs from Heroku config while using Rails 5.2 style credentials for development.
module AppConfig
def self.get(key)
env_val = ENV[key.to_s]
return env_val if env_val.present?
rails_credentials = Rails.application.credentials
# Tries finding a key with the first part being nested first.
# :aws_access_key_id will attempt to grab
# { aws: { access_key_id: 'val' } }

Keybase proof

I hereby claim:

  • I am jlthai on github.
  • I am jlthai (https://keybase.io/jlthai) on keybase.
  • I have a public key ASATtXHznXlbRw7deVF1U_CjZoZrDb_w6fR02a4YFXWu4Ao

To claim this, I am signing this object: