module for model

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.