Module for model

hi everybody

I’ve two models with many lines of duplicated code. Now I want to
eliminate these duplication. So I create a new module and put the
duplicated methods into the module.

So, my question is: Where can I save this module? Is /app/models/ the
right place or how can I save the module in the /lib directory? Perhaps,
I need the methods in some other models too.

an early reply will oblige

greets ribit

On 12/5/06, M. R. [email protected] wrote:

an early reply will oblige

Doesn’t really matter, to tell you the truth. Some people would put
it in the lib dir, because they only keep AR::Base subclasses in the
models dir. I would probably put it in models, because I like to put
all model code (even mixins) in there. lib, to me, is more for
utility classes and extensions. You really can do anything, as long
as it’s in the class path so Ruby can find it.

Pat