mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Revert "Do not reload routes and make spree routes append instead of draw in"
This reverts commit cdf4c795c7c7ae18006eb24af9336941361b6b81.
This commit is contained in:
@@ -28,6 +28,12 @@ module Openfoodnetwork
|
||||
Spree::Core::Engine.routes.default_url_options[:host] = 'test.host' if Rails.env = 'test'
|
||||
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,4 +1,5 @@
|
||||
Spree::Core::Engine.routes.append do
|
||||
# Overriding Devise routes to use our own controller
|
||||
Spree::Core::Engine.routes.draw do
|
||||
devise_for :spree_user,
|
||||
:class_name => 'Spree::User',
|
||||
:controllers => { :sessions => 'spree/user_sessions',
|
||||
|
||||
Reference in New Issue
Block a user