I’m using rails 5. I have this defined in my config/environments/development.rb file
config.hostname = “myapp.com"
and then I try and access this in a helper file by using
url = "https://#{config.hostname}/lti"
but this results in an error,
NameError: undefined local variable or method `config' for ScenariosHelper:Module
How do I access my config variable?
You can access the Rails configuration through
Rails.configuration
, so use: