Commit f7c949c631375b2a29384756d93d99ca6ef2f274
1 parent
a2459221
Exists in
elasticsearch_categories
Fixed style and array.total
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
plugins/elasticsearch/controllers/elasticsearch_plugin_controller.rb
... | ... | @@ -25,7 +25,7 @@ class ElasticsearchPluginController < ApplicationController |
25 | 25 | def define_results |
26 | 26 | @query = params[:query] |
27 | 27 | @results = process_results |
28 | - @hits = @results.total | |
28 | + @hits = ( @results.try(:total) || 0 ) | |
29 | 29 | end |
30 | 30 | |
31 | 31 | def define_searchable_types | ... | ... |