Fix bug in counting search results for assets [SCI-1284]

This commit is contained in:
Oleksii Kriuchykhin 2017-05-17 09:08:40 +02:00
parent f6bd39ec70
commit f28df506f9

View file

@ -96,7 +96,14 @@ class SearchController < ApplicationController
end
def count_by_name(model)
search_by_name(model).limit(nil).offset(nil).size
model.search(current_user,
true,
@search_query,
Constants::SEARCH_NO_LIMIT,
nil,
match_case: @search_case,
whole_word: @search_whole_word,
whole_phrase: @search_whole_phrase).size
end
def count_search_results