Hi Richard I guess this is a bug - I'd not thought of people wanting to clone a search object. Are you using TS as a plugin? If so, can you edit lib/thinking_sphinx/search.rb and add clone to the CoreMethods array near the top of the file, and see if that helps?
-- Pat On 23/02/2010, at 8:22 PM, Richard wrote: > Hi, > > I am wanting to use a separate thinking sphinx object to give me the > list of makers available in a product search, > > If I start with the following (I want to dry this up rather that > having to repeat the same list of criteria) > > @products = Product.order_by_price > @makers = @products.clone > RAILS_DEFAULT_LOGGER.debug "Products Type: #[email protected]}" > RAILS_DEFAULT_LOGGER.debug "Makers Type: #[email protected]}" > > the output I get is > > Products Type: ThinkingSphinx::Search > Makers Type: Array > > I want to call a scope on @makers to group the makers but as it is > already become an array I am not able to. > > Does anyone know how to make a clone? Or have another way of doing > this? Could this be a bug? > > Many thanks > > Richard > > -- > 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. > -- 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.
