]> source.dussan.org Git - redmine.git/commitdiff
Gantt routes with format.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 1 Apr 2011 15:30:32 +0000 (15:30 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 1 Apr 2011 15:30:32 +0000 (15:30 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5280 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/routes.rb
test/integration/routing_test.rb

index f1fc593316cdce7816ec733f113539052a386159..db458be7595bd6120bdb02899968e7e40b22f7aa 100644 (file)
@@ -82,7 +82,8 @@ ActionController::Routing::Routes.draw do |map|
 
   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|
index cb01a891a52789f30e46d42e3af921e45082bc29..705c562824016e96d62cec5a696bf45b34492ef8 100644 (file)
@@ -94,7 +94,9 @@ class RoutingTest < ActionController::IntegrationTest
     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'