pagers 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 141220a884aaf9b747fa3c4aaf939251c3673857
4
- data.tar.gz: 61e63af94b31d3e5d91f8ce92f8c802f3d9db3d4
3
+ metadata.gz: b4048f8520c23f5b8199fb067f94da9323f3be53
4
+ data.tar.gz: c370940b4f2585dce3525d61199874494de7c860
5
5
  SHA512:
6
- metadata.gz: 250118538d5a7964e51aef1db1779f1ce2da04b44617604f1a608ba328b29f6b7701ca05fd1c6b18f8c9547473f096b63d1b034e2eef12fa76e3a85984b2ec67
7
- data.tar.gz: 2867912f87f2cae496224824b9f532afeec370bd38841ea1a06447de21e8f506bd581ad55da25fb7ce19334a85c45a257aca7c0d26f7a2c2c2d383d74be47c9e
6
+ metadata.gz: e060cb836a1ef39df1bf2d39574c40ddcd4b0f2d1140c87076f94439b0ba4807f3975db99b62d611ecc8035875cbd4d9b5b6cd62d4f2c769172448401248d274
7
+ data.tar.gz: b2953675abbd3bd1546719302ad978f31a0bed6f24304a7a0fdabc6870b5237d21c2351c389904f0d8966d99833b4615345afd01e8130c6f6f410f0ded950f20
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2013 Museways
1
+ Copyright 2014 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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] {<img src="https://gemnasium.com/museways/pagers.png" alt="Dependency Status" />}[https://gemnasium.com/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
- Inspired in kaminari and will_paginate but more minimalistic.
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
- = Configuration
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
- Or to set them globally in your application.rb:
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.
@@ -2,7 +2,6 @@ module Pagers
2
2
  module ActiveRecord
3
3
  module Base
4
4
  extend ActiveSupport::Concern
5
-
6
5
  module ClassMethods
7
6
 
8
7
  def inherited(subclass)
@@ -26,7 +26,7 @@ module Pagers
26
26
  def out_of_bounds?
27
27
  @out_of_bounds ||= (current_page > total_pages || current_page < first_page)
28
28
  end
29
-
29
+
30
30
  def total_count
31
31
  @total_count ||= begin
32
32
  r = except(:limit, :offset, :order, :reorder)
@@ -1,5 +1,5 @@
1
1
  module Pagers
2
2
 
3
- VERSION = '3.0.2'
3
+ VERSION = '3.0.3'
4
4
 
5
5
  end
data/lib/pagers.rb CHANGED
@@ -3,7 +3,6 @@ require 'pagers/active_record/base'
3
3
  require 'pagers/active_record/relation'
4
4
  require 'pagers/engine'
5
5
  require 'pagers/railtie'
6
- require 'pagers/version'
7
6
 
8
7
  module Pagers
9
8
  end
@@ -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'
Binary file