On Wed, Jun 13, 2007 at 03:08:54PM +0200, Joerg Diekmann wrote:
> Hi folks,
>
> I have several models that index well in Drb mode.
>
> However, I have one scenario where it works in normal mode, but not in
> Drb mode.
>
> model A
> field :one
> end
>
>
> model B
> belongs_to :a
>
> field :two
> delegate :one, :to => :a
>
> acts_as_ferret :fields => { :one => {}, :two => {} }, :remote => true
> end
>
>
> If I leave off the :remote parameter, it works. Or, if I don't index
> field :one it works in remote mode. But I can't use Drb to index the
> delegate.
>
> Am I doing something wrong?
I'm not sure, but I don't think so :-)
What exactly is your problem? Field :one just not being indexed or an
exception?
Could you try to replace the degate with a normal method call in a
method named 'one' and see what happens then?
A possible cause for this might be that the DRb server doesn't see your
:a relationship when b gets indexed. To check this, you could i.e.
override aaf's to_doc instance method in class B and have a look at the
:a relationship or try to call the delegated method yourself.
Jens
--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk