[uf-rest] RESTifying RAILs

David Heinemeier Hansson david at loudthinking.com
Tue Nov 8 07:26:20 PST 2005

> With one line of code would allow caching to be more
> easily used and allow conditional GETs to be used by
> Rails apps.
> Another plus is that the code that handles comparing the
> If-* headers vs the @resource could be reused to implement
> conditional PUT and conditional DELETE requests.  This
> would be super-cool for web services and AJAX apps to use.

I like this idea, but I think its something that belongs in the realm  
of Action Controller. And not to be associated with Active Record.

So perhaps you would do something like:

class WeblogController
   browser_cache :only => :get, :as => :public, :for => 10.minutes
   def get
     # something or other

I'd definitely like to see that. Caching is something people don't  
ever do because it's just too much of a jungle.
David Heinemeier Hansson
http://www.37signals.com    -- Basecamp, Backpack, Writeboard, Tada
http://www.loudthinking.com -- Broadcasting Brain
http://www.rubyonrails.com  -- Web-application framework

More information about the microformats-rest mailing list