I’m creating a set of classes that depend on them being required() in a specific order because I’m using the class method #inherited on the parent.
Since rails only attempts to load classes when they are first used, the #inherited method of the parent class is only loaded sometimes and not always.
Is it possible to eager load this classes in a rails way? or should I just place them in another directory and call ‘require’?
You can take advantage of the
config.eager_load_pathsattribute that you can set in your environments/(development|production).rb file.from here