KITAITI Makoto
null+****@clear*****
Fri Sep 18 18:02:07 JST 2015
KITAITI Makoto 2015-09-18 18:02:07 +0900 (Fri, 18 Sep 2015) New Revision: 0ca89ca77a3d45d0220f33f2079ea83871671d18 https://github.com/ranguba/epub-searcher/commit/0ca89ca77a3d45d0220f33f2079ea83871671d18 Message: [REFACTORING]Don't ommit search result other than records Modified files: app/controllers/main-controller.rb app/views/index.haml lib/epub-searcher/remote-database.rb Modified: app/controllers/main-controller.rb (+2 -2) =================================================================== --- app/controllers/main-controller.rb 2015-09-18 17:55:28 +0900 (ca72972) +++ app/controllers/main-controller.rb 2015-09-18 18:02:07 +0900 (718051d) @@ -6,14 +6,14 @@ EPUBSearcher::App.controllers do right_query = @query_words && !@query_words.empty? if right_query - @results = search_from_groonga(@query_words) + @results = search_from_groonga(@query_words).records end render 'index' end get :books do - @books = books_from_groonga + @books = books_from_groonga.records render 'books' end Modified: app/views/index.haml (+1 -1) =================================================================== --- app/views/index.haml 2015-09-18 17:55:28 +0900 (33854cc) +++ app/views/index.haml 2015-09-18 18:02:07 +0900 (8562489) @@ -1,4 +1,4 @@ -- content_for(:title) {t('search_results', query_words: @query_words)} if @query_words +- content_for(:title) {t('search_results', query_words: @query_words)} if @results %div{:class => 'container'} %div{:class => 'page-header'} Modified: lib/epub-searcher/remote-database.rb (+1 -1) =================================================================== --- lib/epub-searcher/remote-database.rb 2015-09-18 17:55:28 +0900 (97bb549) +++ lib/epub-searcher/remote-database.rb 2015-09-18 18:02:07 +0900 (ab9ab55) @@ -29,7 +29,7 @@ module EPUBSearcher def select(params = {}) params = params.dup params[:command_version] ||= GROONGA_COMMAND_VERSION - @client.select(params).records + @client.select(params) end def delete(params = {}) -------------- next part -------------- HTML����������������������������... 下载