Tweaked the REST API for ActiveResource compatibility. Introduced a plugin I'm calling to_xml_rails2_style that patches Rails 1.2.x to make Hash#to_xml and Array#to_xml have the same behavior as in Rails 2.0. This means that people can use ActiveResource as a client to consume their Tracks data. See the new example client in doc/tracks_api_wrapper.rb.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@672 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-12-04 06:24:23 +00:00
parent 1d8a9c877b
commit 36c35a7a86
11 changed files with 213 additions and 45 deletions

View file

@ -64,7 +64,7 @@ class ContextsController < ApplicationController
elsif @context.new_record?
render_failure @context.errors.to_xml, 409
else
render :xml => @context.to_xml( :except => :user_id ), :status => 201
head :created, :location => context_url(@context)
end
end
end