Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Walkthrough of Rails’ new REST support

By Peter Cooper / August 1, 2006

HTTP Request => Rails 'params'

GET: /users => [:action => 'index']
GET: /users.xml => [:action => 'index', :format => 'xml']
GET: /users/1 => [:action => 'show', :id => 1]
GET: /users/1;edit => [:action => 'edit', :id => 1]
GET: /users/1.xml => [:action => 'show', :id => 1, :format => 'xml']
POST: /users => [:action => 'create']
PUT: /users/1 => [:action => 'update', :id => 1]
DELETE: /users/1 => [:action => 'destroy', :id => 1]

Prolific 'Edge Rails' blogger Ryan Daigle has written "Simply RESTful Support - And How to Use It", a great walkthrough of the features offered by the simply_restful plugin that's now a core part of Edge Rails and which will provide a lot of the new functionality to be seen in Rails 1.2.

Other Posts to Enjoy

Twitter Mentions