Kouhei Sutou
null+****@clear*****
Wed Dec 21 17:39:19 JST 2016
Kouhei Sutou 2016-12-21 17:39:19 +0900 (Wed, 21 Dec 2016) New Revision: 7cd3aa1789d6e08e8f4be1315ecf5c2491b53b1b https://github.com/ranguba/groonga-client-rails/commit/7cd3aa1789d6e08e8f4be1315ecf5c2491b53b1b Message: Kaminalize Modified files: test/apps/rails5-activerecord/Gemfile test/apps/rails5-activerecord/Gemfile.lock test/apps/rails5-activerecord/app/controllers/posts_controller.rb test/apps/rails5-activerecord/app/views/posts/index.html.erb Modified: test/apps/rails5-activerecord/Gemfile (+1 -0) =================================================================== --- test/apps/rails5-activerecord/Gemfile 2016-12-21 17:34:29 +0900 (c871b0c) +++ test/apps/rails5-activerecord/Gemfile 2016-12-21 17:39:19 +0900 (97aef04) @@ -32,6 +32,7 @@ gem 'jbuilder', '~> 2.5' gem 'groonga-client-rails', path: '../../../' gem 'groonga-client', path: '../../../../groonga-client' +gem 'kaminari' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console Modified: test/apps/rails5-activerecord/Gemfile.lock (+4 -0) =================================================================== --- test/apps/rails5-activerecord/Gemfile.lock 2016-12-21 17:34:29 +0900 (c199266) +++ test/apps/rails5-activerecord/Gemfile.lock 2016-12-21 17:39:19 +0900 (43c1310) @@ -88,6 +88,9 @@ GEM thor (>= 0.14, < 2.0) json (2.0.2) json-stream (0.2.1) + kaminari (0.17.0) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) @@ -185,6 +188,7 @@ DEPENDENCIES groonga-client-rails! jbuilder (~> 2.5) jquery-rails + kaminari listen (~> 3.0.5) puma (~> 3.0) rails (~> 5.0.0, >= 5.0.0.1) Modified: test/apps/rails5-activerecord/app/controllers/posts_controller.rb (+0 -2) =================================================================== --- test/apps/rails5-activerecord/app/controllers/posts_controller.rb 2016-12-21 17:34:29 +0900 (eae7d4e) +++ test/apps/rails5-activerecord/app/controllers/posts_controller.rb 2016-12-21 17:39:19 +0900 (4244c12) @@ -16,8 +16,6 @@ class PostsController < ApplicationController search = search. output_columns([ "_key", - "_score", - "*", "highlight_html(title)", "snippet_html(body)", ]). Modified: test/apps/rails5-activerecord/app/views/posts/index.html.erb (+3 -1) =================================================================== --- test/apps/rails5-activerecord/app/views/posts/index.html.erb 2016-12-21 17:34:29 +0900 (6575b58) +++ test/apps/rails5-activerecord/app/views/posts/index.html.erb 2016-12-21 17:39:19 +0900 (808c2c7) @@ -2,7 +2,7 @@ <h1>Posts</h1> -<p><%= @result_set.n_hits %> records</p> +<p><%= page_entries_info(@result_set, entry_name: "Posts") %></p> <%= form_tag(posts_path, method: "get") do %> <%= search_field_tag "query", params["query"] %> @@ -40,4 +40,6 @@ <br> +<%= paginate(@result_set) %> + <%= link_to 'New Post', new_post_path %> -------------- next part -------------- HTML����������������������������... 다운로드