KITAITI Makoto
null+****@clear*****
Sun Sep 20 18:10:12 JST 2015
KITAITI Makoto 2015-09-20 18:10:12 +0900 (Sun, 20 Sep 2015) New Revision: 3f547cfefc3c41d80ed344b30dc6f5151c52524f https://github.com/ranguba/epub-searcher/commit/3f547cfefc3c41d80ed344b30dc6f5151c52524f Message: Don't assign @drilldowns when it's empty Modified files: app/controllers/main-controller.rb app/views/_authors_drilldown.haml Modified: app/controllers/main-controller.rb (+1 -1) =================================================================== --- app/controllers/main-controller.rb 2015-09-20 18:09:48 +0900 (057cc25) +++ app/controllers/main-controller.rb 2015-09-20 18:10:12 +0900 (3194dd9) @@ -8,7 +8,7 @@ EPUBSearcher::App.controllers do if right_query results = search_from_groonga(@query_words) @results = results.records - @drilldowns = results.drilldowns + @drilldowns = results.drilldowns unless results.drilldowns.empty? @hits = results.n_hits else @drilldowns = author_drilldowns_from_groonga.drilldowns Modified: app/views/_authors_drilldown.haml (+1 -1) =================================================================== --- app/views/_authors_drilldown.haml 2015-09-20 18:09:48 +0900 (e8c95a0) +++ app/views/_authors_drilldown.haml 2015-09-20 18:10:12 +0900 (0fd7ecd) @@ -1,4 +1,4 @@ -- if @drilldowns && ! @drilldowns.first.items.empty? +- if @drilldowns %ul.author-drilldowns -****@drill***** do |author_drilldown| %li= "#{author_drilldown['_key']}(#{author_drilldown['_nsubrecs']})" -------------- next part -------------- HTML����������������������������... 下載