Changes to ActiveResource
If you look at the "Changelog":http://dev.rubyonrails.org/log/trunk/activeresource for ActiveResource, you may notice two important updates. One: the way that the site attribute is copied from the superclass has changed. Where you had something like:
<filter:code lang="ruby"> class Topic < BeastResource site << '/forums/:forum_id' end </filter:code>
You should replace it with:
<filter:code lang="ruby"> class Topic < BeastResource self.site += '/forums/:forum_id' end </filter:code>
The coolest change though, is the new "query string support":http://dev.rubyonrails.org/changeset/5804. Now, you can write code like this: @Topic.find(:all, :forum_id => 1, :sort => 'created_at')@ and get back a query like: @/forums/1/topics.xml?sort=created_at@. (Note, this is not supported by Beast, it is just an example)
I was going to follow this up with a short tutorial on searching Beast with our new querying abilities, but then I looked at how I have the search code implemented. "That controller":http://svn.techno-weenie.net/projects/beast/trunk/app/controllers/posts_controller.rb needs to "lose some weight":http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model.
related
- 2010 Jul 13 In-Process Node.js Queues
- 2010 Jul 07 Geek Talk Interview
- 2010 Jun 28 Tee and Child Processes
- 2010 Jun 23 You can let go now
- 2010 May 17 Railsconf: Building APIs
- 2010 May 10 Nori: Node.js Riak wrapper
- 2010 May 10 No, I did not create a mobile phone framework too
- 2010 May 04 Escaping your test suite with your life
- 2010 Apr 05 Will the iPad kill comic books?
- 2010 Apr 05 First day at GitHub

