…ding seed and sample data" This reverts commit ea65015.
…nd instead" This reverts commit 73bae75.
…nning rake db:admin:create
…d and sample data
When you require a file with Ruby, it caches which files have been required so that it doesn't require them again. What was happening in dev mode in a Spree application is that on that on the second request it wasn't loading the product/scopes file because it thought it had already loaded it. When in fact, it was just being silly. Therefore we need to tell it when it re-defines the Spree::Product class to extend it with the Scopes module which is now defined within this file. When the extend method is called it calls extended on the module which adds the scopes + class methods it needs for the functionality