I need to use some functionality that I’ve added to the Hash class in
an initializer. I’ve written the functionality into /lib/hash.rb;
however, rails apparently loads the files in /lib after the
initializers as the methods are not there to use in the initializer.
I’ve used a require statement at the top of the initializer to get the
require File.join(RAILS_ROOT, ‘lib’, ‘hash’)
It works and no warnings are being thrown in the log; however, since
rails doesn’t load them until after the initializers, I wanted to
ask… Is this unsafe in some way?