Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
Add Comment
Please, Sign In to add comment