Forum: Ruby on Rails Re: adding custom cache field

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Surendra S. (Guest)
on 2006-03-20 19:39
(Received via mailing list)
Hello Jong,

"Jong Hian Zin" <removed_email_address@domain.invalid> wrote:

>Hi Surendra,
>Thanks for the code. I guess I have to modify rails core, i.e.
>associations.rb associations/association_collection.rb and base.rb to add in
>the code, is that correct?

Nope, you don't need to touch the rails core at all. Just add files in
the lib
folder and paste this code. You will be good to use it.

Ruby has this excellent facility which allows one to add functions to an
already existing class.

When I get more time, I will try putting up a blog entry explaining this

Hope this helps.
Surendra S.,
Read my blog at:
| "O thou my friend! The prosperity of Crime is like unto the lightning,
| whose traitorous brilliancies embellish the atmosphere but for an
| instant, in order to hurl into death's very depths the luckless one
| they have dazzled." -- Marquis de Sade
This topic is locked and can not be replied to.