This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

RESTful Rails

Stefan Tilkov,

How did I miss this one back in November? This article by Matt Biddulph explains how to expose your Ruby on Rails model classes as RESTful resources — using Ruby’s metaprogramming support, you end up with adding one line for each resource:

class NewsController < ApplicationController
rest_resource :item
rest_resource :category

Very cool.