Guest User

Untitled

a guest
Jun 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # needs the "hashie" gem in Gemfile
  2. require 'erb'
  3.  
  4. module Movies
  5. class Application < Rails::Application
  6.  
  7. settings = ERB.new(IO.read(File.expand_path('../settings.yml', __FILE__))).result
  8. mash = Hashie::Mash.new(YAML::load(settings)[Rails.env.to_s])
  9.  
  10. mash.each do |key, value|
  11. config.send("#{key}=", value)
  12. end
  13.  
  14. end
  15. end
Add Comment
Please, Sign In to add comment