Merge pull request #5 from apfelfabrik/fix/api-restoring-routes

Fixes problem with core API.
pull/6827/head
ulferts 12 years ago
commit 37fc8e530d
  1. 18
      config/routes.rb

@ -1,6 +1,22 @@
ActionController::Routing::Routes.draw do |map| ActionController::Routing::Routes.draw do |map|
map.connect 'projects/new', :controller => 'projects', :action => 'new' map.connect 'projects/new', :controller => 'projects', :action => 'new'
map.connect 'projects/:id.:format:unused', :controller => 'projects', :action => 'show', :conditions => {:method => :get}, :id => /[^\/]+/, :format => /\w+/, :unused => nil
Project::RESERVED_IDENTIFIERS.each do |reserved_identifier|
map.connect 'projects/:reservation.:format',
:controller => 'projects',
:action => reserved_identifier,
:conditions => {:method => :get},
:reservation => Regexp.new(reserved_identifier),
:format => /\w+/
end
map.connect 'projects/:id.:format',
:controller => 'projects',
:action => 'show',
:conditions => {:method => :get},
:id => /\w+/,
:format => /\w+/
map.with_options :controller => 'my_projects_overviews'do |my| map.with_options :controller => 'my_projects_overviews'do |my|
my.connect 'projects/:id', :action => 'index', :id => /[^\/]+/, :conditions => {:method => :get} my.connect 'projects/:id', :action => 'index', :id => /[^\/]+/, :conditions => {:method => :get}

Loading…
Cancel
Save