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,7 +25,7 @@ class ElasticsearchPluginController < ApplicationController | ||
25 | def define_results | 25 | def define_results |
26 | @query = params[:query] | 26 | @query = params[:query] |
27 | @results = process_results | 27 | @results = process_results |
28 | - @hits = @results.total | 28 | + @hits = ( @results.try(:total) || 0 ) |
29 | end | 29 | end |
30 | 30 | ||
31 | def define_searchable_types | 31 | def define_searchable_types |
plugins/elasticsearch/public/style.css
@@ -3,7 +3,8 @@ | @@ -3,7 +3,8 @@ | ||
3 | } | 3 | } |
4 | 4 | ||
5 | .controller-elasticsearch_plugin .sidebar { | 5 | .controller-elasticsearch_plugin .sidebar { |
6 | - min-width: 240px; | 6 | + min-width: 250px; |
7 | + max-width: 250px; | ||
7 | } | 8 | } |
8 | 9 | ||
9 | .controller-elasticsearch_plugin .search_form { | 10 | .controller-elasticsearch_plugin .search_form { |