fixes #19317, #10927 - move registries to autoload_once path
Partially reverts 70ce8fe to reinstate autoload_once_paths as the preferred way to load registry-type objects with class variables containing data set up during app initialisation (e.g. plugin registrations, menu items.)
autoload_once is compatible with using require_dependency, which is preferred to allow Rails to track which constants are loaded, so eager loading doesn't ever try to load the same file twice (7923c95.)
This moves all registry-type objects to app/registries/ and marks this path as being autoload_once. The contents of this directory should be kept at an absolute minimum to ease development.
Related issues
Bug #10927: Resetting dashboard to default widgets adds no widgets
Bug #19317: Plugin and dashboard widget registry auto-reloaded
fixes #19317, #10927 - move registries to autoload_once path
Partially reverts 70ce8fe to reinstate autoload_once_paths as the
preferred way to load registry-type objects with class variables
containing data set up during app initialisation (e.g. plugin
registrations, menu items.)
autoload_once is compatible with using require_dependency, which is
preferred to allow Rails to track which constants are loaded, so eager
loading doesn't ever try to load the same file twice (7923c95.)
This moves all registry-type objects to app/registries/ and marks this
path as being autoload_once. The contents of this directory should be
kept at an absolute minimum to ease development.