Welcome to Giant Robots Smashing Into Other Giant Robots — a weblog about development, business, design and technology — written by thoughtbot.
ActiveResource in a flurry
A look at the Rails Trac’s timeline shows that ActiveResource is undergoing a lot of activity right now, including attention by DHH. Here’s the interesting things I’ve noticed so far:
- Changeset #6539 – If you save an object, and get an XML body response from the controller, reload the object with the data from that response. So, if the controller performs any machinations on an object while saving it, the client can be informed of the object’s new state.
- Changeset #6550 – Replace Action Web Service with ActiveResource.
- Changeset #6584 – Custom method names for resources. This is a big one. I’m inferring what it does by the CHANGELOG comment:
* Added support for calling custom methods #6979 [rwdaigle]
Person.find(:managers) # => GET /people/managers.xml
Kase.find(1).post(:close) # => POST /kases/1/close.xml
- Changeset #6579 – This expands the default scaffold_resource controller to respond to new.xml. It will return a new object, in XML form. This can be used by a client to automatically figure out the attributes a model supports. There’s really no code change here to Rails itself, new.xml is given for free if you want it. The significance is that it expands Rails’ proposed standard for REST.
So altogether, ActiveResource is getting a lot more fleshed out. I can’t help but expect we’re going to see its public release soon, and this is awesome.
Another note: I’ll be supporting that last one, about new.xml, in Jester in the next release, because I submitted the patch for it myself. It’ll significantly benefit Jester, and I suspect any other non-Ruby ActiveResource client out there. I’ll try to keep Jester up to date with ActiveResource, but that’s looking like a tall order.
About this entry
You're reading an entry on GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS, the company weblog of thoughtbot, inc.
- Author:
- Eric Mill
- Published:
- April 26th 01:27 PM
- Updated:
- April 26th 02:02 PM
- Sections:
- Development Technology
thoughtbot is hiring
We are hiring web developers and web designers in both Boston and New York, NY.
What are we up to?
We built Shoulda, an eclectic set of additions to Test::Unit; Paperclip to manage uploaded files without hassle; Jester, a REST/ActiveResource client library written in Javascript, and Squirrel, an enhancement for ActiveRecord's find syntax; — amongst some other projects.

Chad (President) and Jon (CTO) co-authored a technical book titled Pro Active Record: Databases with Ruby and Rails, which explores the ins and outs of the ActiveRecord ruby library. You can buy it today at Amazon.com.
About thoughtbot, inc.
We are a small web application development consulting business, with offices in Boston, MA and New York, NY. If you're looking to find a team for your next web development project or your new web application — get in touch.
3 comments
Jump to comment form