I think this is till a great solution, but I'd like to suggest you consider using the following in ./config/application.rb instead of a separate initializer:
ruby
# Load application ENV vars and merge with existing ENV vars. Loaded here so can use values in initializers.ENV.update YAML.load_file('config/application.yml')[Rails.env] rescue {}
I think this is till a great solution, but I'd like to suggest you consider using the following in ./config/application.rb instead of a separate initializer:
Source:
http://quickleft.com/blog/simple-rails-app-configuration-settings
To quickly view differences between Rails versions:
http://railsdiff.org/html/v3.2.13-v4.0.0.rc1.html
Use BCrypt::Password.create() instead of BCrypt::Engine and the library takes care of the salt for you:
http://bcrypt-ruby.rubyforge.org/classes/BCrypt/Password.html#M000007