Skip to content

Instantly share code, notes, and snippets.

@tomas-stefano
Last active July 21, 2017 13: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 tomas-stefano/5302804055cf52f90f7a4430fadf3a43 to your computer and use it in GitHub Desktop.
Save tomas-stefano/5302804055cf52f90f7a4430fadf3a43 to your computer and use it in GitHub Desktop.
Read yaml/erb files
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)
minutes: <%= 30.minutes %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment