表单: RailsNotes
用户: dreamable
创建日期: 2021-04-09 04:32:45 UTC
更新日期: 2021-04-09 04:32:45 UTC
引用:(Table ID 3, Record ID 35)

标题 :
Raills secret
笔记 :

guide

It's not working (development OK, production empty)

Rails.application.secrets.secret_key_base

Starting from Rails 5.2 there is no more secrets.yml file and the right way to get the env variables saved in credential.yml.enc is as follows:

Rails.application.credentials.dig(:secret_key_base)
标签: