(ここまで略)
if Rails::VERSION::MAJOR < 3
ActionController::Routing::Routes.draw do |map|
# Use rb/ as a URL 'namespace.' We're using a slightly different URL pattern
# From Redmine so namespacing avoids any further problems down the line
map.resource :rb, :only => :none do |rb|
rb.resource :task, :except => :index, :controller => :rb_tasks, :as => "task/:id"
rb.resources :tasks, :only => :index, :controller => :rb_tasks, :as => "tasks/:story_id"
rb.resource :taskboard, :only => :show, :controller => :rb_taskboards, :as => "taskboards/:sprint_id"
rb.resource :taskboard, :only => :current, :controller => :rb_taskboards, :as => "projects/:project_id/taskboard"
rb_common_routes rb
end
end
else
RedmineApp::Application.routes.draw do # ★追加
resource :rb, :only => :none do |rb|
# releases
# resources :projects do
# resources :releases, :only => [:index, :new,:show, :edit, :destroy, :snapshot], :controller => :rb_releases do
# get 'snapshot', :on => :member
# post 'edit', :on => :member
# post 'new', :on => :member
# end
# end
rb_common_routes rb
resources :task, :except => :index, :controller => :rb_tasks
rb_match rb, 'tasks/:story_id', :to => 'rb_tasks#index', :via => [:get]
rb_match rb, 'taskboards/:sprint_id',
:to => 'rb_taskboards#show', :via => [:get]
rb_match rb, 'projects/:project_id/taskboard',
:to => 'rb_taskboards#current', :via => [:get]
end # resource :rb, :only => :none do |rb|
end # RedmineApp::Application.routes.draw do ★追加
end # if Rails::VERSION::MAJOR < 3 else```