The stack trace doesn't really give too much details: NoMethodError (undefined method `singularize' for :users:Symbol): /usr/local/lib/ruby/gems/1.8/gems/freelancing-god-thinking- sphinx-1.2.8/lib/thinking_sphinx/search.rb:102:in `send' /usr/local/lib/ruby/gems/1.8/gems/freelancing-god-thinking- sphinx-1.2.8/lib/thinking_sphinx/search.rb:102:in `method_missing' app/controllers/searches_controller.rb:31:in `search'
On Aug 27, 5:09 pm, Pat Allan <[email protected]> wrote: > Hmm, can you provide a full stack-trace? > > -- > Pat > > On 28/08/2009, at 12:14 AM, gmoniey wrote: > > > > > It seems that the latest version of ts causes rails to complain when > > rendering search results to_xml. For the following line: > > > render :xml => { :users => { :total_count => users ? > > users.total_entries : 0, :users => users } } > > > I get an error which looks like: > > > NoMethodError (undefined method `singularize' for :users:Symbol): > > > The error goes away if I cast the results to an array, as such: > > > render :xml => { :users => { :total_count => users ? > > users.total_entries : 0, :users => users.to_a } } > > > Just wondering if this was a known change. > > > Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
