Skip to main content

Rails 5.2 Credentials

Rails • Asked by Philip Benton

Me again :)

Question about the new credentials in 5.2...

I've upgraded to 5.2 and actually really like credentials but wondering. Is it now the place to store all sensitive information including database access, etc?

Currently I store db access within bash environment variables. It seems now that the only thing needed in the bash file is the RAILS_MASTER_KEY

Yep, you can put your database credentials in there and reference them in your database.yml I think.

I've just successfully added an admin user to credentials and referenced it in my seed.rb file so I guess adding anything to it will work the same.

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 20,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.