will_paginate_serial_link_renderer 0.0.3 → 0.0.4

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: 45acbd7b714d8fa36204cecca646b68eba08153f
4
- data.tar.gz: 644a9a84d17578368053b12844a28f0141330f2d
3
+ metadata.gz: 1b7a6a5b7c13a3b8be909fd0eea584970d2ce8a1
4
+ data.tar.gz: 21f4633d8de89e5413b981f00c23f8dddd766d24
5
5
  SHA512:
6
- metadata.gz: 3a0eca3077edfc5dba0a0ed04bd0c97beea87acd8a77487345820876fa905d8f5f57a759e9fe5a8de1d4bb34458940b42491e0afb3ecb464886bc5a8c5094fcb
7
- data.tar.gz: ac22a49f09f61d228c07503b7e3f602616ce47eeaa4a55424ffb84afe48fb0df8284b73294ff505e713c2a20362603cec2e590deebc47ec6066a6c8be78e03ba
6
+ metadata.gz: 3c7a2236c1519390136451cdd618e7caab32701ecee33f0a29294db6fa5cb9d01a705d88878fb5c10d89ded4c58964c666dadec9122042066e868515ffc8c0ec
7
+ data.tar.gz: 34d8a85106c1e2554e34c01ab67a0d6a7a6ae0d31578adae9f18937baf12a052d0b10ff6060dcfede4940f60c94c109f5015723a2000a9c190eb91e8c7ea1c67
@@ -19,7 +19,7 @@ module WillPaginateSerialLinkRenderer
19
19
  def to_html
20
20
  [
21
21
  previous_page_tag,
22
- tag(:div, nil, {:"data-pagination" => pagination[1..-2]}),
22
+ tag(:div, nil, {:"data-pagination" => represent_pages_as_string(pagination[1..-2])}),
23
23
  next_page_tag
24
24
  ].join('')
25
25
  end
@@ -36,18 +36,22 @@ module WillPaginateSerialLinkRenderer
36
36
 
37
37
  def previous_page_tag
38
38
  if previous_page
39
- tag(:div, "Previous", {:"data-pagination" => previous_page})
39
+ tag(:div, "Previous", {:"data-pagination" => "prev:#{previous_page}", :class => "pagination-tag"})
40
40
  else
41
- previous_or_next_page(nil, @options[:previous_label], 'previous_page')
41
+ tag(:div, "Previous", {:"data-pagination" => "prev:nil", :class => "pagination-tag"})
42
42
  end
43
43
  end
44
44
 
45
45
  def next_page_tag
46
46
  if next_page
47
- tag(:div, "Next", {:"data-pagination" => next_page})
47
+ tag(:div, "Next", {:"data-pagination" => "next:#{next_page}", :class => "pagination-tag"})
48
48
  else
49
- previous_or_next_page(nil, @options[:next_label], 'next_page')
49
+ tag(:div, "Next", {:"data-pagination" => "next:nil", :class => "pagination-tag"})
50
50
  end
51
51
  end
52
+
53
+ def represent_pages_as_string(items)
54
+ items.map(&:to_s).join('+')
55
+ end
52
56
  end
53
57
  end
@@ -1,3 +1,3 @@
1
1
  module WillPaginateSerialLinkRenderer
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate_serial_link_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morgan Laco