Skip to content

Commit

Permalink
Do not reload routes and make spree routes append instead of draw in
Browse files Browse the repository at this point in the history
case thee routes are already defined elsewhere, for example, by the
paypal express gem
  • Loading branch information
luisramos0 committed Oct 20, 2020
1 parent 52f6924 commit cdf4c79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ class Application < Rails::Application
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
Expand Down
3 changes: 1 addition & 2 deletions config/routes/spree.rb
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit cdf4c79

Please sign in to comment.