Hi Sean,

It, looks like calling the (observer).instance method in activate does
the trick.  I'm also mentioning it at the end of the two classes I'm
observing, so that could be doing it as well -- haven't tried figuring
out which is responsible yet.

I think my problem is actually related to the fact that the observer
doesn't seem to get notified when the join table in a HABTM
relationship gets changed -- only when one of the two actual models
does.  I haven't completely confirmed that yet, but that's what it's
looking like.  That's a more general Rails question I guess, but
anyone ever tackled that before?

Thanks,
Andrew

On 6/5/07, Sean Cribbs <[EMAIL PROTECTED]> wrote:
> Andrew,
>
> You might be able to just 'mention' the class in the activate method so
> it gets loaded.  Then your observer would have to have an "observe" call
> in its class.  Not sure if that will actually work, but it's worth a try.
>
> Sean
>
> Andrew O'Brien wrote:
> > Is there a good way to add an ActiveRecord observer through and
> > extension's activate method?  I'm guessing the standard way (adding it
> > to the config in environment.rb) won't work since the extension hasn't
> > loaded yet.
> >
> > Thanks,
> > Andrew
> > _______________________________________________
> > Radiant mailing list
> > Post:   Radiant@lists.radiantcms.org
> > Search: http://radiantcms.org/mailing-list/search/
> > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> >
> >
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to