Re: Expand Active Record

Mindtonic
2007-09-05T13:15:55Z

I am wanting to add the self.full_text_search for Ferret in a way that
I only have to put it in one place and not in every single model that
I want to be able to search.  That would be a lot of repeating
myself!  Thanks...

On Sep 4, 7:54 pm, Robby Russell
<robby.li...-/Lcn8Y7Ot69QmPsQ1CNsNQ@public.gmane.org>
wrote:
> Mindtonic wrote:
> > Silly question, how do I expand (add a function to) Active Record for
> > all of my models?
>
> Depends on where in Active Record you want to extend it.
>
> In a nutshell, you just create a new module and include it in ActiveRecord.
>
> --
> Robby Russellhttp://www.robbyonrails.com     # my
bloghttp://www.planetargon.com      # my businesshttp://www.programmingrails.com
# my book