Module: Spree::RoutingExtension

Defined in:
lib/plugins/extension_patches/lib/routing_extension.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
13
# File 'lib/plugins/extension_patches/lib/routing_extension.rb', line 8

def self.included(base)
  base.class_eval do
    alias :draw_without_plugin_routes :draw
    alias :draw :draw_with_plugin_routes
  end
end

Instance Method Details

#draw_with_plugin_routesObject



15
16
17
18
19
20
# File 'lib/plugins/extension_patches/lib/routing_extension.rb', line 15

def draw_with_plugin_routes   
  draw_without_plugin_routes do |mapper|
    add_extension_routes(mapper)
    yield mapper
  end
end