From abbed6b376a777f74b4aa8762a94a60fdcf233b5 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Sat, 10 Jun 2006 06:00:32 +0000 Subject: [PATCH] Make Tracks respond to request for xml to /todo/show/[action id]. Try it out using something like: curl -H 'Accept: application/xml' --basic --user YOUR_TRACKS_USERNAME:YOUR_TRACKS_PASSWORD http://localhost:3000/todo/show/22 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@258 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todo_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index b68800fc..e3c69a39 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -131,6 +131,14 @@ class TodoController < ApplicationController render :partial => 'action_edit_form', :object => item end + + def show + self.init + item = check_user_return_item + respond_to do |wants| + wants.xml { render :xml => item.to_xml( :root => 'todo', :except => :user_id ) } + end + end def edit_deferred_action self.init