I have an array of local towns (@local_towns) relative to the current
town and want to find all people living in a local town...

The current controller logic I'm converting over to thinking sphinx is
as follows:
@people = Person.find(:all, :conditions => ["town_id IN(?)",
@local_towns])

However, when I try to use thinking sphinx, it throws an undefined
method `to_f' error
@people = Person.search :conditions => {:town_id => @local_towns}

although entering the array manually seems to work ok...
@people = Person.search :conditions => {:town_id => [1, 2, 3]}

Is there something I'm missing?

--~--~---------~--~----~------------~-------~--~----~
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