Skip to content

Instantly share code, notes, and snippets.

@thomasvanholder
Last active January 22, 2021 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasvanholder/b8188e3c940d4fc9dc5bb51d7e053861 to your computer and use it in GitHub Desktop.
Save thomasvanholder/b8188e3c940d4fc9dc5bb51d7e053861 to your computer and use it in GitHub Desktop.
How to use credentials in Javascript.erb file
// ruby code only possible with js.erb format
const abc = "<%= Rails.application.credentials.google_api_key %>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment