How to check if a Rails model is defined?
I’m using a Ruby on Rails 5.2.8 version and I have found a bug in code. The code should check at runtime if a model is defined. At first I tried to use the defined?
method, but because the development environment lazy loads the modules I have encountered unexpected (for me) behaviour: