Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# needs the "hashie" gem in Gemfile
require 'erb'
module Movies
class Application < Rails::Application
settings = ERB.new(IO.read(File.expand_path('../settings.yml', __FILE__))).result
mash = Hashie::Mash.new(YAML::load(settings)[Rails.env.to_s])
mash.each do |key, value|
config.send("#{key}=", value)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.