pagers 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.rdoc +17 -11
- data/lib/pagers/active_record/base.rb +0 -1
- data/lib/pagers/active_record/relation.rb +1 -1
- data/lib/pagers/version.rb +1 -1
- data/lib/pagers.rb +0 -1
- data/test/dummy/config/initializers/secret_token.rb +1 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1129 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4048f8520c23f5b8199fb067f94da9323f3be53
|
4
|
+
data.tar.gz: c370940b4f2585dce3525d61199874494de7c860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e060cb836a1ef39df1bf2d39574c40ddcd4b0f2d1140c87076f94439b0ba4807f3975db99b62d611ecc8035875cbd4d9b5b6cd62d4f2c769172448401248d274
|
7
|
+
data.tar.gz: b2953675abbd3bd1546719302ad978f31a0bed6f24304a7a0fdabc6870b5237d21c2351c389904f0d8966d99833b4615345afd01e8130c6f6f410f0ded950f20
|
data/MIT-LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,34 +1,40 @@
|
|
1
|
-
{<img src="https://badge.fury.io/rb/pagers.png" alt="Gem Version" />}[http://badge.fury.io/rb/pagers] {<img src="https://codeclimate.com/github/museways/pagers.png" />}[https://codeclimate.com/github/museways/pagers] {<img src="https://travis-ci.org/museways/pagers.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/pagers]
|
1
|
+
{<img src="https://badge.fury.io/rb/pagers.png" alt="Gem Version" />}[http://badge.fury.io/rb/pagers] {<img src="https://codeclimate.com/github/museways/pagers.png" />}[https://codeclimate.com/github/museways/pagers] {<img src="https://travis-ci.org/museways/pagers.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/pagers]
|
2
2
|
|
3
3
|
= Pagers
|
4
4
|
|
5
|
-
|
5
|
+
Minimalistic pagers inspired in kaminari and will_paginate for rails.
|
6
6
|
|
7
7
|
= Install
|
8
8
|
|
9
9
|
Put this line in your Gemfile:
|
10
10
|
gem 'pagers'
|
11
|
-
|
11
|
+
|
12
12
|
Then bundle:
|
13
13
|
$ bundle
|
14
|
-
|
14
|
+
|
15
15
|
= Usage
|
16
16
|
|
17
|
-
Call the page scope:
|
17
|
+
Call the page scope from your models:
|
18
18
|
@collection = Model.page(1, length: 10, padding: 4)
|
19
19
|
|
20
20
|
And in your views just:
|
21
21
|
<%= paginate @collection %>
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
== Defaults
|
26
|
-
|
27
|
-
If you want to change defaults you can override the values in the helper:
|
23
|
+
You can customize the parameter and the pages if you like:
|
28
24
|
<%= paginate @collection, parameter: :p, pages: 3 %>
|
29
25
|
|
30
|
-
|
26
|
+
= Configuration
|
27
|
+
|
28
|
+
All the defaults can be customized globally in your application.rb:
|
31
29
|
config.pagers.parameter = :p
|
32
30
|
config.pagers.pages = 3
|
33
31
|
config.pagers.length = 5
|
34
32
|
config.pagers.padding = 0
|
33
|
+
|
34
|
+
= Credits
|
35
|
+
|
36
|
+
This gem is maintained and funded by museways[http://museways.com].
|
37
|
+
|
38
|
+
= License
|
39
|
+
|
40
|
+
It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
|
data/lib/pagers/version.rb
CHANGED
data/lib/pagers.rb
CHANGED
@@ -9,4 +9,5 @@
|
|
9
9
|
|
10
10
|
# Make sure your secret_key_base is kept private
|
11
11
|
# if you're sharing your code publicly.
|
12
|
+
Dummy::Application.config.secret_token = 'aa572dada91fb7649605f63cc687725e10ed30fddf9930432632a5fca89789fb3a83e42ef6d255b5b4c93805ccb5a3befbea0f4eaf60f48b3d95606be83fdd3f'
|
12
13
|
Dummy::Application.config.secret_key_base = 'aa572dada91fb7649605f63cc687725e10ed30fddf9930432632a5fca89789fb3a83e42ef6d255b5b4c93805ccb5a3befbea0f4eaf60f48b3d95606be83fdd3f'
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|