From: Christophe Grandsire Date: 2005-10-24T17:17:02+09:00 Subject: Re: Newby syntax question Selon "Achim Domma (SyynX Solutions GmbH)" : > > class RecipeController < ApplicationController > scaffold :recipe > end > > What exactly is 'scaffold' in this case? A class method of > ApplicationController? Spot on! Notice though that it's also a class method of RecipeController. Class methods also get inherited. And it's as class method of RecipeController that it works here. Does this method manipulate the RecipeController > class somehow? Note that I am not very knowledgeable about Rails (I'm probably one of the few Rubyists that has not tried his hand at it yet ;) ), but if I remember correctly it does, creating various instance methods of RecipeController for the creating, modifying, accessing and erasing of recipe records (put a big AFAIK behind that). It's basically like attr_accessor, which is also a class method (actually defined in Module) and also takes a symbol. Something like: class Foo attr_accessor :foo end just creates two methods "foo" and "foo=" to access and modify the contents of the instance variable @foo it also created for the occasion :) . Or am I on the complete wrong way? > On the contrary, you were extremely close. -- Christophe Grandsire. http://rainbow.conlang.free.fr It takes a straight mind to create a twisted conlang.