I am getting A NoMethodError occurred in main#search: undefined method `sphinx_facets'' for nil:NilClass [RAILS_ROOT]/vendor/plugins/ thinking-sphinx/lib/thinking_sphinx/facet_search.rb:131:in `facet_from_object'' Its occur in special scenerio... Can any body tell me when and how to resolve this exception?? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Peter De Berdt
2010-Feb-11 13:55 UTC
Re: undefined method `sphinx_facets'' for nil:NilClass
On 11 Feb 2010, at 12:48, Rabia Akhtar wrote:> I am getting > A NoMethodError occurred in main#search: > > undefined method `sphinx_facets'' for nil:NilClass > [RAILS_ROOT]/vendor/plugins/ > thinking-sphinx/lib/thinking_sphinx/facet_search.rb:131:in > `facet_from_object'' > > > Its occur in special scenerio... > Can any body tell me when and how to resolve this exception??1. Make sure you don''t get nil values 2. If nil values can''t be avoided, check for nil and don''t call sphinx_facets on it. Best regards Peter De Berdt -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.