-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamically (re)load event subscribers
Until now, adding subscribers to Spree::Event.subscribers was developers' responsibility. This commit aims at automating the task by making Rails load subscriber files located in standard paths both in Solidus core and in the store app during the Rails initialization processs. When each file is required, it's now also added to the `Spree::Event.subscribers` list. Solidus core event subscribers are always loaded automatically, while the ones included in the store app can be loaded manually when the preference Spree::Config.events.autoload_subscribers is changed to a falsey value. A similar feature will be added to `solidus_support` in order to automatically subscribe subscribers from extensions.
- Loading branch information
1 parent
c964e5d
commit 6bf34f9
Showing
5 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters