Do not reload routes and make spree routes append instead of draw in

case thee routes are already defined elsewhere, for example, by the
paypal express gem
This commit is contained in:
Luis Ramos
2020-09-03 18:27:48 +01:00
parent b7aa04353c
commit 0ca71ce0a9
2 changed files with 1 additions and 8 deletions

View File

@@ -33,12 +33,6 @@ module Openfoodnetwork
end
end
# We reload the routes here
# so that the appended/prepended routes are available to the application.
config.after_initialize do
Rails.application.routes_reloader.reload!
end
initializer "spree.environment", before: :load_config_initializers do |app|
app.config.spree = Spree::Core::Environment.new
Spree::Config = app.config.spree.preferences # legacy access

View File

@@ -1,5 +1,4 @@
# Overriding Devise routes to use our own controller
Spree::Core::Engine.routes.draw do
Spree::Core::Engine.routes.append do
devise_for :spree_user,
:class_name => 'Spree::User',
:controllers => { :sessions => 'spree/user_sessions',