Where to save a module for model mixin


#1

Hi,

I have a module with a method I would like to mixin with several models.
Where is the simplest approved location to store this module. I know I
could
do it with a plugin but this seems like overkill. Also this method in
the
module interacts with other models so it would not be a stand alone
plugin I
could share with other people.

Thanks,
Peter


#2

Thanks, Pat. Unfortuantely the rails book (p184) implies lib/ is not the
place for this. It says that lib is for code that is not application
specific and that the directory is “vestigial”. My code is application
specific and if using lib is deprecated then where else could i put
this. I
suppose I could just keep the module in model/

Peter


#3

Throw it in RAILS_ROOT/lib