Correctly shows no results text

Correct search results count
This commit is contained in:
Phil Hughes 2016-04-21 11:05:50 +01:00
parent 3137559dfd
commit 06276bd355
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ module SearchHelper
if collection.count > 0
from = collection.offset_value + 1
to = collection.offset_value + collection.length
count = collection.count
count = collection.total_count
"Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
end

View file

@ -1,4 +1,4 @@
- if @search_results.empty?
- if @objects.empty?
= render partial: "search/results/empty"
- else
.gray-content-block