rails 6 get environment variable in view code example
Example: rails call env file
#in the .ENV file:
SECRET_TOKEN=qoLsDGcc8YEdeFQ8xWbtiwafMJvjUXpH
#in your code
key = ENV['SECRET_TOKEN']
#in the .ENV file:
SECRET_TOKEN=qoLsDGcc8YEdeFQ8xWbtiwafMJvjUXpH
#in your code
key = ENV['SECRET_TOKEN']