mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-25 00:24:07 +01:00
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:
parent
1d8a9c877b
commit
36c35a7a86
11 changed files with 213 additions and 45 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue