/ your_view.html.slim
div#something data-api-key=(ENV['API_KEY'])
// your_file.js
const apiKey = document.getElementById('something').dataset.apiKey
⚠ Your API_KEY is exposed publicly in that case.
/ your_view.html.slim
div#something data-api-key=(ENV['API_KEY'])
// your_file.js
const apiKey = document.getElementById('something').dataset.apiKey
⚠ Your API_KEY is exposed publicly in that case.