From: Kris Date: 2006-04-10T23:39:28+09:00 Subject: Re: Adding in class attribute with a Module Its very useful, the trouble is the models can't see the session (for good reasons) but they need information from the controller level, such as current logged in user, and passing it every time you create a model is a pain and can easily be forgottern. Using cattr_accessor you can set and forget. Is this maybe a question better asked on the Rails forum? Austin Ziegler wrote: > On 4/10/06, kris wrote: >> PS. I didnt write cattr_accessor. I'm using Rails but I dont think it is >> opart of that? > > cattr_accessor is a Railsism. It is not part of standard Ruby. > > I'm undecided whether it should be or not, but it is potentially very > useful. > > You will need to add an "included" hook. See "ri Module#included". > > -austin -- Posted via http://www.ruby-forum.com/.