Last active
July 21, 2017 13:07
-
-
Save tomas-stefano/5302804055cf52f90f7a4430fadf3a43 to your computer and use it in GitHub Desktop.
Read yaml/erb files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
session_config_file = File.read('config/session_expiration.yml') | |
session_config = YAML.load(ERB.new(session_config_file).result(binding)) | |
session_config['expiration_time'] # => 1800 seconds (30 minutes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
minutes: <%= 30.minutes %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment