volt-pagination 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20822ef5e5482e330de7bd923874ec794565a9f2
4
- data.tar.gz: a6f640dc8c61770157ad0e3da35ebb172edf3723
3
+ metadata.gz: 373ef27d71c2ca92b75dcff62c92ef113b7808d3
4
+ data.tar.gz: 2d55d969cdbbad4233afec8d93f2b62c7bfd7e04
5
5
  SHA512:
6
- metadata.gz: b089f065906c0683b063f8537946849bf13022fcd2a824fadc60f95ab1e6ef13f6be637db7a7ef64070b358e2eced0265930e8c8bfd225d26c25e6cc1a69adf5
7
- data.tar.gz: d2ad3596ecfa778e95f0c7ce81407706f4e0d9952799f8887a5e0b67bd0ff1e1fea2b0516856fa96d396065f1a33aa3604bd041c3a9355d8638d504f1857a086
6
+ metadata.gz: e4804bb18efd502e2ce4488a649366a78c40b6c2fc2b0d6fac9333609c31a4a2c0191f922b798c5b87d5de2f4f0665db0f31563e73a6e57e8a97965e3ddee7c4
7
+ data.tar.gz: b5a300aeb3e643557ee663482342b4f3f3d5775fa4bf0b511f92f8db572a844d8a1e78b0444b57b1869d4ed8acf19615348f3a5d1dabd899cab604c9402c0465
data/README.md CHANGED
@@ -20,7 +20,7 @@ To page a collection or query, simply use ```.skip``` and ```.limit```
20
20
  Assuming a page size of 10:
21
21
 
22
22
  def items_on_page
23
- store._items.find({active: true}).skip((params._page.or(1).to_i - 1) * 10).limit(10)
23
+ store._items.find({active: true}).skip((params._page || 1).to_i - 1) * 10).limit(10)
24
24
  end
25
25
 
26
26
  Then in your view you can add:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.1.0
@@ -51,19 +51,19 @@ module Pagination
51
51
  end
52
52
 
53
53
  def window
54
- attrs.window.or(5).to_i
54
+ (attrs.window || 5).to_i
55
55
  end
56
56
 
57
57
  def outer_window
58
- attrs.outer_window.or(1).to_i
58
+ (attrs.outer_window || 1).to_i
59
59
  end
60
60
 
61
61
  def per_page
62
- attrs.per_page.or(10).to_i
62
+ (attrs.per_page || 10).to_i
63
63
  end
64
64
 
65
65
  def current_page
66
- params.send(:"_#{page_param_name}").or(1).to_i
66
+ (params.send(:"_#{page_param_name}") || 1).to_i
67
67
  end
68
68
 
69
69
  def total_pages
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: volt