Is it still considered a best practice to load some configuration parameters inside environment.rb with yaml files within the /config directory? It seems like a pretty good way to do this, but if there was a better way, it’d be good to know about it. I’ve tried to find articles about loading configuration settings in Rails / YAML but most of the articles don’t go past 2009. Makes me feel like there came a better (or new standard) way to do this. Thanks!
Is it still considered a best practice to load some configuration parameters inside environment.rb
Share
I’ve been using this gem for that purpose recently:
Basically, you create a
/config/application.ymlfile that looks something like this:There are so many ways to do this, but this works well and is pretty straightforward.