kaminari 1.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kaminari might be problematic. Click here for more details.

@@ -0,0 +1,22 @@
1
+ Kaminari is a volunteer effort. We encourage you to pitch in.
2
+
3
+ __*We only accept bug reports and pull requests in GitHub*__. Join the team!
4
+
5
+ * If you have a support question about how to use kaminari, please [ask on StackOverflow](http://stackoverflow.com/search?tab=newest&q=kaminari).
6
+ * Bug reports should include the following:
7
+ - Minimal example of code to reproduce the bug
8
+ - Stacktrace
9
+ - What you expected to see, and what you actually saw.
10
+
11
+ * Feature requests should be accompanied by a patch, that includes tests.
12
+ * We won't accept any feature requests that come without a patch.
13
+
14
+ In addition, we generally don't accept requests that fall within one or more of the following categories:
15
+
16
+ * Requests without any legitimate use cases
17
+ * Requests for which the primary goal is to make a certain piece of code consistent
18
+ * [Cosmetic changes](https://github.com/rails/rails/pull/13771#issuecomment-32746700)
19
+
20
+ Thanks! :heart: :heart: :heart:
21
+
22
+ Kaminari Team
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in kaminari.gemspec
6
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Akira Matsuda
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,573 @@
1
+ # Kaminari [![Build Status](https://travis-ci.org/kaminari/kaminari.svg)](http://travis-ci.org/kaminari/kaminari) [![Code Climate](https://codeclimate.com/github/kaminari/kaminari/badges/gpa.svg)](https://codeclimate.com/github/kaminari/kaminari) [![Inch CI](http://inch-ci.org/github/kaminari/kaminari.svg)](http://inch-ci.org/github/kaminari/kaminari)
2
+
3
+ A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs
4
+
5
+ ## Features
6
+
7
+ ### Clean
8
+ Does not globally pollute `Array`, `Hash`, `Object` or `AR::Base`.
9
+
10
+ ### Easy to Use
11
+ Just bundle the gem, then your models are ready to be paginated.
12
+ No configuration required.
13
+ Don't have to define anything in your models or helpers.
14
+
15
+ ### Simple Scope-based API
16
+ Everything is method chainable with less "Hasheritis". You know, that's the modern Rails way.
17
+ No special collection class or anything for the paginated values, instead using a general `AR::Relation` instance.
18
+ So, of course you can chain any other conditions before or after the paginator scope.
19
+
20
+ ### Customizable Engine-based I18n-aware Helpers
21
+ As the whole pagination helper is basically just a collection of links and non-links, Kaminari renders each of them through its own partial template inside the Engine.
22
+ So, you can easily modify their behaviour, style or whatever by overriding partial templates.
23
+
24
+ ### ORM & Template Engine Agnostic
25
+ Kaminari supports multiple ORMs (ActiveRecord, DataMapper, Mongoid, MongoMapper) multiple web frameworks (Rails, Sinatra, Grape), and multiple template engines (ERB, Haml, Slim).
26
+
27
+ ### Modern
28
+ The pagination helper outputs the HTML5 `<nav>` tag by default. Plus, the helper supports Rails unobtrusive Ajax.
29
+
30
+
31
+ ## Supported Versions
32
+
33
+ * Ruby 2.0.0, 2.1.x, 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7
34
+
35
+ * Rails 4.1, 4.2, 5.0, 5.1, 5.2, 6.0
36
+
37
+ * Sinatra 1.4, 2.0
38
+
39
+ * Haml 3+
40
+
41
+ * Mongoid 3+
42
+
43
+ * MongoMapper 0.9+
44
+
45
+ * DataMapper 1.1.0+
46
+
47
+
48
+ ## Installation
49
+
50
+ To install kaminari on the default Rails stack, just put this line in your Gemfile:
51
+
52
+ ```ruby
53
+ gem 'kaminari'
54
+ ```
55
+
56
+ Then bundle:
57
+
58
+ ```sh
59
+ % bundle
60
+ ```
61
+
62
+ If you're building non-Rails of non-ActiveRecord app and want the pagination feature on it, please take a look at [Other Framework/Library Support](#other-frameworklibrary-support) section.
63
+
64
+
65
+ ## Query Basics
66
+
67
+ ### The `page` Scope
68
+
69
+ To fetch the 7th page of users (default `per_page` is 25)
70
+
71
+ ```ruby
72
+ User.page(7)
73
+ ```
74
+
75
+ Note: pagination starts at page 1, not at page 0 (page(0) will return the same results as page(1)).
76
+
77
+ You can get page numbers or page conditions by using below methods.
78
+ ```ruby
79
+ User.count #=> 1000
80
+ User.page(1).limit_value #=> 20
81
+ User.page(1).total_pages #=> 50
82
+ User.page(1).current_page #=> 1
83
+ User.page(1).next_page #=> 2
84
+ User.page(2).prev_page #=> 1
85
+ User.page(1).first_page? #=> true
86
+ User.page(50).last_page? #=> true
87
+ User.page(100).out_of_range? #=> true
88
+ ```
89
+
90
+ ### The `per` Scope
91
+
92
+ To show a lot more users per each page (change the `per_page` value)
93
+
94
+ ```ruby
95
+ User.page(7).per(50)
96
+ ```
97
+
98
+ Note that the `per` scope is not directly defined on the models but is just a method defined on the page scope.
99
+ This is absolutely reasonable because you will never actually use `per_page` without specifying the `page` number.
100
+
101
+ Keep in mind that `per` internally utilizes `limit` and so it will override any `limit` that was set previously.
102
+ And if you want to get the size for all request records you can use `total_count` method:
103
+
104
+ ```ruby
105
+ User.count #=> 1000
106
+ a = User.limit(5); a.count #=> 5
107
+ a.page(1).per(20).size #=> 20
108
+ a.page(1).per(20).total_count #=> 1000
109
+ ```
110
+
111
+ ### The `padding` Scope
112
+
113
+ Occasionally you need to pad a number of records that is not a multiple of the page size.
114
+
115
+ ```ruby
116
+ User.page(7).per(50).padding(3)
117
+ ```
118
+
119
+ Note that the `padding` scope also is not directly defined on the models.
120
+
121
+ ### Unscoping
122
+
123
+ If for some reason you need to unscope `page` and `per` methods you can call `except(:limit, :offset)`
124
+
125
+ ```ruby
126
+ users = User.page(7).per(50)
127
+ unpaged_users = users.except(:limit, :offset) # unpaged_users will not use the kaminari scopes
128
+ ```
129
+
130
+ ## Configuring Kaminari
131
+
132
+ ### General Configuration Options
133
+
134
+ You can configure the following default values by overriding these values using `Kaminari.configure` method.
135
+
136
+ default_per_page # 25 by default
137
+ max_per_page # nil by default
138
+ max_pages # nil by default
139
+ window # 4 by default
140
+ outer_window # 0 by default
141
+ left # 0 by default
142
+ right # 0 by default
143
+ page_method_name # :page by default
144
+ param_name # :page by default
145
+ params_on_first_page # false by default
146
+
147
+ There's a handy generator that generates the default configuration file into config/initializers directory.
148
+ Run the following generator command, then edit the generated file.
149
+
150
+ ```sh
151
+ % rails g kaminari:config
152
+ ```
153
+
154
+ ### Changing `page_method_name`
155
+
156
+ You can change the method name `page` to `bonzo` or `plant` or whatever you like, in order to play nice with existing `page` method or association or scope or any other plugin that defines `page` method on your models.
157
+
158
+
159
+ ### Configuring Default per_page Value for Each Model by `paginates_per`
160
+
161
+ You can specify default `per_page` value per each model using the following declarative DSL.
162
+
163
+ ```ruby
164
+ class User < ActiveRecord::Base
165
+ paginates_per 50
166
+ end
167
+ ```
168
+
169
+ ### Configuring Max per_page Value for Each Model by `max_paginates_per`
170
+
171
+ You can specify max `per_page` value per each model using the following declarative DSL.
172
+ If the variable that specified via `per` scope is more than this variable, `max_paginates_per` is used instead of it.
173
+ Default value is nil, which means you are not imposing any max `per_page` value.
174
+
175
+ ```ruby
176
+ class User < ActiveRecord::Base
177
+ max_paginates_per 100
178
+ end
179
+ ```
180
+
181
+
182
+ ## Controllers
183
+
184
+ ### The Page Parameter Is in `params[:page]`
185
+
186
+ Typically, your controller code will look like this:
187
+
188
+ ```ruby
189
+ @users = User.order(:name).page params[:page]
190
+ ```
191
+
192
+
193
+ ## Views
194
+
195
+ ### The Same Old Helper Method
196
+
197
+ Just call the `paginate` helper:
198
+
199
+ ```erb
200
+ <%= paginate @users %>
201
+ ```
202
+
203
+ This will render several `?page=N` pagination links surrounded by an HTML5 `<nav>` tag.
204
+
205
+
206
+ ## Helpers
207
+
208
+ ### The `paginate` Helper Method
209
+
210
+ ```erb
211
+ <%= paginate @users %>
212
+ ```
213
+
214
+ This would output several pagination links such as `« First ‹ Prev ... 2 3 4 5 6 7 8 9 10 ... Next › Last »`
215
+
216
+ ### Specifying the "inner window" Size (4 by default)
217
+
218
+ ```erb
219
+ <%= paginate @users, window: 2 %>
220
+ ```
221
+
222
+ This would output something like `... 5 6 7 8 9 ...` when 7 is the current
223
+ page.
224
+
225
+ ### Specifying the "outer window" Size (0 by default)
226
+
227
+ ```erb
228
+ <%= paginate @users, outer_window: 3 %>
229
+ ```
230
+
231
+ This would output something like `1 2 3 ...(snip)... 18 19 20` while having 20 pages in total.
232
+
233
+ ### Outer Window Can Be Separately Specified by left, right (0 by default)
234
+
235
+ ```erb
236
+ <%= paginate @users, left: 1, right: 3 %>
237
+ ```
238
+
239
+ This would output something like `1 ...(snip)... 18 19 20` while having 20 pages in total.
240
+
241
+ ### Changing the Parameter Name (`:param_name`) for the Links
242
+
243
+ ```erb
244
+ <%= paginate @users, param_name: :pagina %>
245
+ ```
246
+
247
+ This would modify the query parameter name on each links.
248
+
249
+ ### Extra Parameters (`:params`) for the Links
250
+
251
+ ```erb
252
+ <%= paginate @users, params: {controller: 'foo', action: 'bar'} %>
253
+ ```
254
+
255
+ This would modify each link's `url_option`. :`controller` and :`action` might be the keys in common.
256
+
257
+ ### Ajax Links (crazy simple, but works perfectly!)
258
+
259
+ ```erb
260
+ <%= paginate @users, remote: true %>
261
+ ```
262
+
263
+ This would add `data-remote="true"` to all the links inside.
264
+
265
+ ### Specifying an Alternative Views Directory (default is kaminari/)
266
+
267
+ ```erb
268
+ <%= paginate @users, views_prefix: 'templates' %>
269
+ ```
270
+
271
+ This would search for partials in `app/views/templates/kaminari`.
272
+ This option makes it easier to do things like A/B testing pagination templates/themes, using new/old templates at the same time as well as better integration with other gems such as [cells](https://github.com/apotonick/cells).
273
+
274
+ ### The `link_to_next_page` and `link_to_previous_page` (aliased to `link_to_prev_page`) Helper Methods
275
+
276
+ ```erb
277
+ <%= link_to_next_page @items, 'Next Page' %>
278
+ ```
279
+
280
+ This simply renders a link to the next page. This would be helpful for creating a Twitter-like pagination feature.
281
+
282
+ ### The `page_entries_info` Helper Method
283
+
284
+ ```erb
285
+ <%= page_entries_info @posts %>
286
+ ```
287
+
288
+ This renders a helpful message with numbers of displayed vs. total entries.
289
+
290
+ By default, the message will use the humanized class name of objects in collection: for instance, "project types" for ProjectType models.
291
+ The namespace will be cut out and only the last name will be used. Override this with the `:entry_name` parameter:
292
+
293
+ ```erb
294
+ <%= page_entries_info @posts, entry_name: 'item' %>
295
+ #=> Displaying items 6 - 10 of 26 in total
296
+ ```
297
+
298
+ ### The `rel_next_prev_link_tags` Helper Method
299
+
300
+ ```erb
301
+ <%= rel_next_prev_link_tags @users %>
302
+ ```
303
+
304
+ This renders the rel next and prev link tags for the head.
305
+
306
+ ### The `path_to_next_page` Helper Method
307
+
308
+ ```erb
309
+ <%= path_to_next_page @users %>
310
+ ```
311
+
312
+ This returns the server relative path to the next page.
313
+
314
+ ### The `path_to_prev_page` Helper Method
315
+
316
+ ```erb
317
+ <%= path_to_prev_page @users %>
318
+ ```
319
+
320
+ This returns the server relative path to the previous page.
321
+
322
+
323
+ ## I18n and Labels
324
+
325
+ The default labels for 'first', 'last', 'previous', '...' and 'next' are stored in the I18n yaml inside the engine, and rendered through I18n API.
326
+ You can switch the label value per I18n.locale for your internationalized application. Keys and the default values are the following. You can override them by adding to a YAML file in your `Rails.root/config/locales` directory.
327
+
328
+ ```yaml
329
+ en:
330
+ views:
331
+ pagination:
332
+ first: "&laquo; First"
333
+ last: "Last &raquo;"
334
+ previous: "&lsaquo; Prev"
335
+ next: "Next &rsaquo;"
336
+ truncate: "&hellip;"
337
+ helpers:
338
+ page_entries_info:
339
+ one_page:
340
+ display_entries:
341
+ zero: "No %{entry_name} found"
342
+ one: "Displaying <b>1</b> %{entry_name}"
343
+ other: "Displaying <b>all %{count}</b> %{entry_name}"
344
+ more_pages:
345
+ display_entries: "Displaying %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> of <b>%{total}</b> in total"
346
+ ```
347
+
348
+ If you use non-English localization see [i18n rules](https://github.com/svenfuchs/i18n/blob/master/test/test_data/locales/plurals.rb) for changing
349
+ `one_page:display_entries` block.
350
+
351
+
352
+ ## Customizing the Pagination Helper
353
+
354
+ Kaminari includes a handy template generator.
355
+
356
+ ### To Edit Your Paginator
357
+
358
+ Run the generator first,
359
+
360
+ ```sh
361
+ % rails g kaminari:views default
362
+ ```
363
+
364
+ then edit the partials in your app's `app/views/kaminari/` directory.
365
+
366
+ ### For Haml/Slim Users
367
+
368
+ You can use the [html2haml gem](https://github.com/haml/html2haml) or the [html2slim gem](https://github.com/slim-template/html2slim) to convert erb templates.
369
+ The kaminari gem will automatically pick up haml/slim templates if you place them in `app/views/kaminari/`.
370
+
371
+ ### Multiple Templates
372
+
373
+ In case you need different templates for your paginator (for example public and admin), you can pass `--views-prefix directory` like this:
374
+
375
+ ```sh
376
+ % rails g kaminari:views default --views-prefix admin
377
+ ```
378
+
379
+ that will generate partials in `app/views/admin/kaminari/` directory.
380
+
381
+ ### Themes
382
+
383
+ The generator has the ability to fetch several sample template themes from the external repository (https://github.com/amatsuda/kaminari_themes) in addition to the bundled "default" one, which will help you creating a nice looking paginator.
384
+
385
+ ```sh
386
+ % rails g kaminari:views THEME
387
+ ```
388
+
389
+ To see the full list of available themes, take a look at the themes repository, or just hit the generator without specifying `THEME` argument.
390
+
391
+ ```sh
392
+ % rails g kaminari:views
393
+ ```
394
+
395
+ ### Multiple Themes
396
+
397
+ To utilize multiple themes from within a single application, create a directory within the app/views/kaminari/ and move your custom template files into that directory.
398
+
399
+ ```sh
400
+ % rails g kaminari:views default (skip if you have existing kaminari views)
401
+ % cd app/views/kaminari
402
+ % mkdir my_custom_theme
403
+ % cp _*.html.* my_custom_theme/
404
+ ```
405
+
406
+ Next, reference that directory when calling the `paginate` method:
407
+
408
+ ```erb
409
+ <%= paginate @users, theme: 'my_custom_theme' %>
410
+ ```
411
+
412
+ Customize away!
413
+
414
+ Note: if the theme isn't present or none is specified, kaminari will default back to the views included within the gem.
415
+
416
+
417
+ ## Paginating Without Issuing SELECT COUNT Query
418
+
419
+ Generally the paginator needs to know the total number of records to display the links, but sometimes we don't need the total number of records and just need the "previous page" and "next page" links.
420
+ For such use case, Kaminari provides `without_count` mode that creates a paginatable collection without counting the number of all records.
421
+ This may be helpful when you're dealing with a very large dataset because counting on a big table tends to become slow on RDBMS.
422
+
423
+ Just add `.without_count` to your paginated object:
424
+
425
+ ```ruby
426
+ User.page(3).without_count
427
+ ```
428
+
429
+ In your view file, you can only use simple helpers like the following instead of the full-featured `paginate` helper:
430
+
431
+ ```erb
432
+ <%= link_to_prev_page @users, 'Previous Page' %>
433
+ <%= link_to_next_page @users, 'Next Page' %>
434
+ ```
435
+
436
+
437
+ ## Paginating a Generic Array object
438
+
439
+ Kaminari provides an Array wrapper class that adapts a generic Array object to the `paginate` view helper. However, the `paginate` helper doesn't automatically handle your Array object (this is intentional and by design).
440
+ `Kaminari::paginate_array` method converts your Array object into a paginatable Array that accepts `page` method.
441
+
442
+ ```ruby
443
+ @paginatable_array = Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
444
+ ```
445
+
446
+ You can specify the `total_count` value through options Hash. This would be helpful when handling an Array-ish object that has a different `count` value from actual `count` such as RSolr search result or when you need to generate a custom pagination. For example:
447
+
448
+ ```ruby
449
+ @paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
450
+ ```
451
+
452
+ or, in the case of using an external API to source the page of data:
453
+ ```ruby
454
+ page_size = 10
455
+ one_page = get_page_of_data params[:page], page_size
456
+ @paginatable_array = Kaminari.paginate_array(one_page.data, total_count: one_page.total_count).page(params[:page]).per(page_size)
457
+ ```
458
+
459
+
460
+ ## Creating Friendly URLs and Caching
461
+
462
+ Because of the `page` parameter and Rails routing, you can easily generate SEO and user-friendly URLs. For any resource you'd like to paginate, just add the following to your `routes.rb`:
463
+
464
+ ```ruby
465
+ resources :my_resources do
466
+ get 'page/:page', action: :index, on: :collection
467
+ end
468
+ ```
469
+
470
+ If you are using Rails 4 or later, you can simplify route definitions by using `concern`:
471
+
472
+ ```ruby
473
+ concern :paginatable do
474
+ get '(page/:page)', action: :index, on: :collection, as: ''
475
+ end
476
+
477
+ resources :my_resources, concerns: :paginatable
478
+ ```
479
+
480
+ This will create URLs like `/my_resources/page/33` instead of `/my_resources?page=33`. This is now a friendly URL, but it also has other added benefits...
481
+
482
+ Because the `page` parameter is now a URL segment, we can leverage on Rails page [caching](http://guides.rubyonrails.org/caching_with_rails.html#page-caching)!
483
+
484
+ NOTE: In this example, I've pointed the route to my `:index` action. You may have defined a custom pagination action in your controller - you should point `action: :your_custom_action` instead.
485
+
486
+
487
+ ## Other Framework/Library Support
488
+
489
+ ### The kaminari gem
490
+
491
+ Technically, the kaminari gem consists of 3 individual components:
492
+
493
+ kaminari-core: the core pagination logic
494
+ kaminari-activerecord: Active Record adapter
495
+ kaminari-actionview: Action View adapter
496
+
497
+ So, bundling `gem 'kaminari'` is equivalent to the following 2 lines (kaminari-core is referenced from the adapters):
498
+
499
+ ```ruby
500
+ gem 'kaminari-activerecord'
501
+ gem 'kaminari-actionview'
502
+ ```
503
+
504
+ ### For Other ORM Users
505
+
506
+ If you want to use other supported ORMs instead of ActiveRecord, for example Mongoid, bundle its adapter instead of kaminari-activerecord.
507
+
508
+ ```ruby
509
+ gem 'kaminari-mongoid'
510
+ gem 'kaminari-actionview'
511
+ ```
512
+
513
+ Kaminari currently provides adapters for the following ORMs:
514
+
515
+ * Active Record: https://github.com/kaminari/kaminari/tree/master/kaminari-activerecord (included in this repo)
516
+ * Mongoid: https://github.com/kaminari/kaminari-mongoid
517
+ * MongoMapper: https://github.com/kaminari/kaminari-mongo_mapper
518
+ * DataMapper: https://github.com/kaminari/kaminari-data_mapper (would not work on kaminari 1.0.x)
519
+
520
+ ### For Other Web Framework Users
521
+
522
+ If you want to use other web frameworks instead of Rails + Action View, for example Sinatra, bundle its adapter instead of kaminari-actionview.
523
+
524
+ ```ruby
525
+ gem 'kaminari-activerecord'
526
+ gem 'kaminari-sinatra'
527
+ ```
528
+
529
+ Kaminari currently provides adapters for the following web frameworks:
530
+
531
+ * Action View: https://github.com/kaminari/kaminari/tree/master/kaminari-actionview (included in this repo)
532
+ * Sinatra: https://github.com/kaminari/kaminari-sinatra
533
+ * Grape: https://github.com/kaminari/kaminari-grape
534
+
535
+
536
+ ## For More Information
537
+
538
+ Check out Kaminari recipes on the GitHub Wiki for more advanced tips and techniques. https://github.com/kaminari/kaminari/wiki/Kaminari-recipes
539
+
540
+
541
+ ## Questions, Feedback
542
+
543
+ Feel free to message me on Github (amatsuda) or Twitter ([@a_matsuda](https://twitter.com/a_matsuda)) ☇☇☇ :)
544
+
545
+
546
+ ## Contributing to Kaminari
547
+
548
+ Fork, fix, then send a pull request.
549
+
550
+ To run the test suite locally against all supported frameworks:
551
+
552
+ ```sh
553
+ % bundle install
554
+ % rake test:all
555
+ ```
556
+
557
+ To target the test suite against one framework:
558
+
559
+ ```sh
560
+ % rake test:active_record_50
561
+ ```
562
+
563
+ You can find a list of supported test tasks by running `rake -T`. You may also find it useful to run a specific test for a specific framework. To do so, you'll have to first make sure you have bundled everything for that configuration, then you can run the specific test:
564
+
565
+ ```sh
566
+ % BUNDLE_GEMFILE='gemfiles/active_record_50.gemfile' bundle install
567
+ % BUNDLE_GEMFILE='gemfiles/active_record_50.gemfile' TEST=kaminari-core/test/requests/navigation_test.rb bundle exec rake test
568
+ ```
569
+
570
+
571
+ ## Copyright
572
+
573
+ Copyright (c) 2011- Akira Matsuda. See MIT-LICENSE for further details.