Skip to content
Snippets Groups Projects

Remove redundant counts in snippets search

Merged Heinrich Lee Yu requested to merge 44353-improve-snippet-search-performance into master
2 files
+ 3
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -24,10 +24,10 @@ def search_autocomplete_opts(term)
end
def search_entries_info(collection, scope, term)
return unless collection.count > 0
return unless collection.total_pages > 0
from = collection.offset_value + 1
to = collection.offset_value + collection.count
to = collection.offset_value + collection.to_a.size
count = collection.total_count
"Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
Loading