mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Improve requiring of additional routes
This is more appropriate, and allows changes the separate route files to be loaded automatically in the development environment.
This commit is contained in:
@@ -92,6 +92,12 @@ module Openfoodnetwork
|
||||
#{config.root}/app/jobs
|
||||
)
|
||||
|
||||
config.paths["config/routes"] = %w(
|
||||
config/routes.rb
|
||||
config/routes/admin.rb
|
||||
config/routes/spree.rb
|
||||
).map { |relative_path| Rails.root.join(relative_path) }
|
||||
|
||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
||||
@@ -112,6 +112,3 @@ Openfoodnetwork::Application.routes.draw do
|
||||
mount Spree::Core::Engine, :at => '/'
|
||||
|
||||
end
|
||||
|
||||
require Rails.root.join("config/routes/admin.rb")
|
||||
require Rails.root.join("config/routes/spree.rb")
|
||||
|
||||
Reference in New Issue
Block a user