Remove Spree::BaseController.class_eval, these methods are already in the application helper through spree::application_helpers

We can ignore the difference in spree_logout_path as spree.logout_path is the user_sessions#destroy route
This commit is contained in:
luisramos0
2019-07-08 13:33:35 +01:00
parent 36e3362fc1
commit e897eb0439
2 changed files with 1 additions and 19 deletions

View File

@@ -1,18 +0,0 @@
Spree::BaseController.class_eval do
def spree_login_path
spree.login_path
end
def spree_signup_path
spree.signup_path
end
def spree_logout_path
spree.destroy_spree_user_session_path
end
def spree_current_user
current_spree_user
end
end

View File

@@ -15,7 +15,7 @@ Spree::Core::ControllerHelpers::Order.class_eval do
end
alias_method_chain :current_order, :scoped_variants
# Override definition in spree/auth/app/controllers/spree/base_controller_decorator.rb
# Override definition in Spree::Core::ControllerHelpers::Order
# Do not attempt to merge incomplete and current orders. Instead, destroy the incomplete orders.
def set_current_order
if user = try_spree_current_user