Closed aldesantis closed 4 years ago
@aldesantis I have one concern.
We're adding new private methods to a class that inherits form Rails::Engine
, a class that we don't own. I wonder if the new methods, having a rather generic name, may end up in overriding the ones that could be defined by the superclass in a remote but still plausible future.
So, instead of for example decorators_root
, would something like solidus_decorators_root
make more sense?
@spaghetticode I think that's a good point. It seems unlikely that Rails will officially introduce the concept of engines at some point, but it doesn't hurt to give the methods names that are a bit more specific.
Improves
EngineExtensions::Decorators
to automatically load the right files when Solidus engines are installed. For instance, if solidus_backend is installed, it will tell Rails to loadlib/views/backend
andlib/controllers/backend
, as well as the decorators inlib/decorators/backend
.This also renames
SolidusSupport::EngineExtensions::Decorators
toSolidusSupport::EngineExtensions
, since the module doesn't only deal with decorators anymore.