On 16/02/2009, at 11:27 PM, Christian Rishøj wrote:

> Hmm. While this change did solve the clash on method name,
> ActiveRecord's compute_type for "Search" still returns
> ThinkingSphinx::ActiveRecord::Search instead of my model:
>
>>> ActiveRecord::Base.send :compute_type, 'Search'
> => ThinkingSphinx::ActiveRecord::Search
>
> This is because compute_type relies on class_eval:
>
>>> ActiveRecord::Base.class_eval 'Search'
> => ThinkingSphinx::ActiveRecord::Search
>
> Possible solutions?
> - Rename ThinkingSphinx::ActiveRecord::Search?
> - Use define_method-calls instead of include in
> ThinkingSphinx::ActiveRecord::Search?
>
> What do you think?

Bah, that's annoying. The rename feels like the cleaner solution... I  
guess change the module from Search to SphinxSearch. In the long term,  
the module namespace may change anyway, when we shift towards  
something ORM-agnostic to allow DataMapper support.

Patch and see if that helps, and I'll merge it in when I get the chance.

Cheers

-- 
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to