Using Secrets.yml File In Rails 4.1+

Posted By Weston Ganger

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:

Article Topic:Software Development - Ruby / Rails

Date:May 13, 2015