I''ve done this before by adding the mixin source file to the model
folder.
I suspect it would work from lib/ too.
Cheers,
Dan.
On 5/10/06, DJ Tequila <mail@djtequila.com> wrote:>
> If I have several models which exhibit the same functionality, it seems
> makes sense to create a mixin, ''include'' it in each model
and save
> myself some work and repeated code.
>
> Where can I define a module which will be available to all models? I
> can''t seem to find a documented place for them.
>
> Alternatively, is there a Rails-standard way of achieving the effect?
>
> Ben
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Dan Venkitachalam
expandingbrain.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060513/db88f0a4/attachment.html