map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes|
gantts_routes.connect '/projects/:project_id/issues/gantt'
- gantts_routes.connect '/issues/gantt'
+ gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
+ gantts_routes.connect '/issues/gantt.:format'
end
map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name'
should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show'
+ should_route :get, "/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :format => 'pdf'
should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name'
+ should_route :get, "/projects/project-name/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :project_id => 'project-name', :format => 'pdf'
should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues'