diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 43169d1c9db7ed8b781c9b48e3c31837a2ea4f8d..7f585cd5dd9e3517bd3a1c92bed5a8100d350d2d 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -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 diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index 252c1508a50f17a15f92c735b84b30184d33e100..204f5a36f85e126dba570ee1de8b3c1f8dea1f03 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -1,4 +1,4 @@ -- if @search_results.empty? +- if @objects.empty? = render partial: "search/results/empty" - else .gray-content-block