What's new? | Help | Directory | Sign in
Google
restcontroller
The basic 7 ReST actions in a controller you can inherit from to DRY up your rails app
  
  
  
  
    
Code License: MIT License
Labels: ReST, rails
Join project
Project owners:
  timocratic
svn checkout http://restcontroller.googlecode.com/svn/trunk/ app/controllers/rest
class YourModelController < REST::RestController

and you have the basic ReST actions covered. Customize by adding anything you want shared across all ReST controllers in an app, such as

before_filter :require_login, :except =>[:show, :index]

or override any action on a controller by controller basis. See ExampleUsage for more details.

By default it assumes that both edit and create use the edit template.