11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/lib/goldberg/routes.rb', line 11
def draw_with_goldberg_routes(&block)
draw_without_goldberg_routes do |map|
block.call map
end
routes = [
['',
{:controller => "goldberg/content_pages",
:action => "view_default"}],
['menu/*name',
{:controller => 'goldberg/menu_items', :action => 'link'}],
['*page_name',
{:controller => "goldberg/content_pages", :action => "view"}]
]
route_method = ActionController::Routing::Routes.respond_to?(:add_route)?
:add_route : :connect
for route in routes do
ActionController::Routing::Routes.send(route_method, *route)
end
if ActionController::Routing::Routes.respond_to? :write_generation and
ActionController::Routing::Routes.respond_to? :write_recognition
ActionController::Routing::Routes.write_generation
ActionController::Routing::Routes.write_recognition
end
end
|