Parcourir la source

Gantt routes with format.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5280 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.2.0
Jean-Philippe Lang il y a 13 ans
Parent
révision
063ae06b09
2 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 2
    1
      config/routes.rb
  2. 2
    0
      test/integration/routing_test.rb

+ 2
- 1
config/routes.rb Voir le fichier

@@ -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|

+ 2
- 0
test/integration/routing_test.rb Voir le fichier

@@ -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'


Chargement…
Annuler
Enregistrer