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
diff --git a/core/lib/spree/core/controller_helpers/auth.rb b/core/lib/spree/core/controller_helpers/auth.rb | |
index 3f21ebb7c6..2112505391 100644 | |
--- a/core/lib/spree/core/controller_helpers/auth.rb | |
+++ b/core/lib/spree/core/controller_helpers/auth.rb | |
@@ -54,6 +54,11 @@ module Spree | |
Spree::UserLastUrlStorer.new(self).store_location | |
end | |
+ # Auth extensions are expected to define it, otherwise it's a no-op | |
+ def spree_current_user |
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
#In rails console: | |
include FactoryBot::Syntax::Methods | |
#From: https://github.com/thoughtbot/factory_bot/issues/397#issuecomment-6662051 | |
FactoryBot.define do | |
to_create do |instance| | |
unless instance.save | |
raise "Invalid record: " + instance.errors.messages.to_s | |
end |
OlderNewer