[Groonga-commit] ranguba/epub-searcher at 6c32de4 [master] Show 0 as result count when no hit

Back to archive index

KITAITI Makoto null+****@clear*****
Sun Sep 20 18:31:24 JST 2015


KITAITI Makoto	2015-09-20 18:31:24 +0900 (Sun, 20 Sep 2015)

  New Revision: 6c32de42e1096d352d23c377dba37ff6e144c1b6
  https://github.com/ranguba/epub-searcher/commit/6c32de42e1096d352d23c377dba37ff6e144c1b6

  Message:
    Show 0 as result count when no hit

  Modified files:
    app/controllers/main-controller.rb

  Modified: app/controllers/main-controller.rb (+1 -1)
===================================================================
--- app/controllers/main-controller.rb    2015-09-20 18:22:27 +0900 (3194dd9)
+++ app/controllers/main-controller.rb    2015-09-20 18:31:24 +0900 (e7abb1e)
@@ -9,7 +9,7 @@ EPUBSearcher::App.controllers do
       results = search_from_groonga(@query_words)
       @results = results.records
       @drilldowns = results.drilldowns unless results.drilldowns.empty?
-      @hits = results.n_hits
+      @hits = results.n_hits.to_i
     else
       @drilldowns = author_drilldowns_from_groonga.drilldowns
     end
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index