Monday, June 2, 2008

Scaffold versus Scaffold Resource

Scaffolding has always been the standard way to start a Ruby on Rails piece/component/controller, generating the standard files and paths based on the specified model name. More recently, though, scaffold now creates a RESTful version of these rails conventions. At one time it simply generated regular CRUD, and then scaffold_resource came along to create a REST-based controller, model, and views. Now scaffold does that, by creating the correct views, actions, and allowing Rails to respond to different types of requests (XML, HTML, etc), which make it more restful.