get "/relation/:id" => "relations#show", :id => /\d+/, :as => :relation
get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history
resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show
- resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do
- match :subscribe, :on => :member, :via => [:get, :post]
- match :unsubscribe, :on => :member, :via => [:get, :post]
+ resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do
+ resource :subscription, :controller => :changeset_subscriptions, :only => [:show, :create, :destroy]
namespace :changeset_comments, :as => :comments, :path => :comments do
resource :feed, :only => :show, :defaults => { :format => "rss" }
end
end
+ get "/changeset/:id/subscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription")
+ get "/changeset/:id/unsubscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription")
+
resources :notes, :path => "note", :id => /\d+/, :only => [:show, :new]
get "/user/:display_name/history" => "changesets#index"
post "/preview/:type" => "site#preview", :as => :preview
# traces
- resources :traces, :id => /\d+/, :except => [:show]
+ resources :traces, :id => /\d+/, :except => [:show] do
+ resource :data, :module => :traces, :only => :show
+ end
get "/user/:display_name/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces/tag/%{tag}")
get "/user/:display_name/traces/tag/:tag" => "traces#index"
get "/user/:display_name/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces")
get "/traces/mine/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/mine")
get "/traces/mine" => "traces#mine"
get "/trace/create", :to => redirect(:path => "/traces/new")
- get "/trace/:id/data" => "traces#data", :id => /\d+/, :as => "trace_data"
+ get "/trace/:id/data", :format => false, :id => /\d+/, :to => redirect(:path => "/traces/%{id}/data")
+ get "/trace/:id/data.:format", :id => /\d+/, :to => redirect(:path => "/traces/%{id}/data.%{format}")
get "/trace/:id/edit", :id => /\d+/, :to => redirect(:path => "/traces/%{id}/edit")
namespace :traces, :path => "" do