From df8cd4a7b2c364864aad0e4d9f56c1a4f4f0e990 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Mon, 20 Apr 2009 19:44:58 +0000 Subject: [PATCH] Expose relation version to api and fix remaining server status typo in old_relation controller. --- app/controllers/old_relation_controller.rb | 2 +- config/routes.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/old_relation_controller.rb b/app/controllers/old_relation_controller.rb index 159b56f20..f8751d27c 100644 --- a/app/controllers/old_relation_controller.rb +++ b/app/controllers/old_relation_controller.rb @@ -35,7 +35,7 @@ class OldRelationController < ApplicationController rescue ActiveRecord::RecordNotFound render :nothing => true, :status => :not_found rescue - render :nothing => true, :status => :internal_service_error + render :nothing => true, :status => :internal_server_error end end end diff --git a/config/routes.rb b/config/routes.rb index fcf22bced..e95ec1e76 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -36,6 +36,7 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/relation/:id/relations", :controller => 'relation', :action => 'relations_for_relation', :id => /\d+/ map.connect "api/#{API_VERSION}/relation/:id/history", :controller => 'old_relation', :action => 'history', :id => /\d+/ map.connect "api/#{API_VERSION}/relation/:id/full", :controller => 'relation', :action => 'full', :id => /\d+/ + map.connect "api/#{API_VERSION}/relation/:id/:version", :controller => 'old_relation', :action => 'version', :id => /\d+/, :version => /\d+/ map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'read', :id => /\d+/, :conditions => { :method => :get } map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'update', :id => /\d+/, :conditions => { :method => :put } map.connect "api/#{API_VERSION}/relation/:id", :controller => 'relation', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete } -- 2.43.2