Merge pull request #5796 from coopdevs/remove-conlicting-spree-route

Remove conflicting and duplicate route
This commit is contained in:
Luis Ramos
2020-07-23 14:29:12 +01:00
committed by GitHub
4 changed files with 5 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ module Spree
if @user
authorize! params[:action].to_sym, @user
else
redirect_to spree.login_path
redirect_to main_app.login_path
end
end

View File

@@ -10,7 +10,7 @@ class UserPasswordsController < Spree::UserPasswordsController
if resource.errors.empty?
set_flash_message(:success, :send_instructions) if is_navigational_format?
respond_with resource, location: spree.login_path
respond_with resource, location: main_app.login_path
else
respond_to do |format|
format.html do

View File

@@ -13,7 +13,6 @@ Spree::Core::Engine.routes.draw do
resources :users, :only => [:edit, :update]
devise_scope :spree_user do
get '/login' => 'user_sessions#new', :as => :login
post '/login' => 'user_sessions#create', :as => :create_new_session
get '/logout' => 'user_sessions#destroy', :as => :logout
get '/signup' => 'user_registrations#new', :as => :signup

View File

@@ -11,7 +11,9 @@ module Spree
current_spree_user
end
delegate :login_path, to: :spree, prefix: true
def spree_login_path
main_app.login_path
end
delegate :signup_path, to: :spree, prefix: true