Rails singleton became empty after development reload
问题 In my rails app I've decided to use singleton to create some sort of factory to get objects properly. config/initializers/registry.rb: registry = Registry.instance registry.define_lazy :period_predictor do PeriodPredictor.new(NotificationBuilder.new, 28, 4, 3) end registry.define_lazy :notification_sender do NotificationSender.new end lib/registry.rb: # Registry class which is singleton and stores values. class Registry include Singleton # Define simple value. Like a constant. # # @param key