solidusio / solidus_support

Common runtime helpers for Solidus extensions.
BSD 3-Clause "New" or "Revised" License
9 stars 23 forks source link

Fix dependency on the engines load order when adding paths #65

Closed waiting-for-dev closed 2 years ago

waiting-for-dev commented 3 years ago

We were adding the view and controller paths at engine loading time. So, E.g., if a frontend engine was present, but we loaded it after the extension depending on solidus_support (i.e., the extension went first on the Gemfile), paths weren't being loaded.

We're adding the paths on an initializer that runs before Rails's :initialize_dependency_mechanism one. Thenceforth Rails begins messing with the load paths, and it doesn't take them into account anymore.

References nebulab/solidus_starter_frontend#162