Module: Spree::RoutingExtensionMapper
- Defined in:
- lib/plugins/extension_patches/lib/routing_extension.rb
Overview
RoutingExtension
Instance Method Summary collapse
Instance Method Details
#load_extension_routes ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/plugins/extension_patches/lib/routing_extension.rb', line 36 def load_extension_routes map = self paths_to_routes = Spree::ExtensionLoader.instance.load_extension_roots paths_to_routes.each do |routes_path| source = "#{routes_path}/config/routes.rb" if File.directory?("#{routes_path}/config") begin RAILS_DEFAULT_LOGGER.info "INFO: Loading routes from #{source}" eval File.read(source) if File.file?(source) rescue LoadError, NameError => e $stderr.puts "Could not load routes from : #{source}.\n#{e.inspect}" nil end end end end |