Simplify query for existing email

It should be easier to read and more efficient now.
This commit is contained in:
Maikel Linke
2018-03-13 09:10:37 +11:00
committed by Maikel Linke
parent fe979b801f
commit 45fc42723c

View File

@@ -88,7 +88,7 @@ Spree::Order.class_eval do
end
def registered_email?
Spree.user_class.find_by_email(email).present?
Spree.user_class.exists?(email: email)
end
def disallow_guest_order