mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user