-
Notifications
You must be signed in to change notification settings - Fork 330
RESTful Scaffolding
Yvem edited this page Jan 18, 2011
·
4 revisions
ActiveScaffold handle all the REST operations. Active scaffold supports by default the following formats :
- HTML
- js
- XML
- json
- yaml
map.resources :users, :active_scaffold => true
We suppose a common "thing" ressource.
GET http://my-server/things/1.xml
GET http://my-server/things/3.yaml
GET http://my-server/things.yaml?property=special
- PUT
http://my-server/things.xml
- data =
<?xml version='1.0' encoding='UTF-8'?><record><designation>special thing</designation><quantity>3</quantity></record>
- content_type => :xml
(user note : I have never been able to PUT in another format than XML. If someone can help...)