search for: hotal_hit

Displaying 1 result from an estimated 1 matches for "hotal_hit".

Did you mean: hotal_hits
2007 Jan 15
3
Wrong total_hits when using conditions in find_by_contents
...find_by_content(''ruby'') Result will contain 3 items and "total_hits" will return 3 However, if I add a condition: result = Article.find_by_content(''ruby'', {}, ''visible = 1'') Result will contain 2 items - which is correct But "hotal_hits" will still return 3 - not what I would expect. ----------------------------- Fix for this: 1) In the acts_as_ferret plugin, find the file class_methods.rb 2) Go to line 276 where you have this code-block [code]if results.any? conditions = combine_conditions([ "#{table_name}.#{pri...