I was running brakeman (a rails security scanner) and it was complaining about a secret_token in config/initializers/secret_token.rb. So I looked into the secrets.yml file and heres how it works.
For example I am going to show how to setup the secret_key_base.
# config/initializers/secret_token.rb.yml
YourAppName::Application.config.secret_key_base = Rails.application.secrets.secret_key_base
Related External Links: