paginate-responder 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module PaginateResponder
2
2
  module VERSION
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STAGE = nil
7
7
 
8
8
  def self.to_s
@@ -9,7 +9,7 @@ module Responders
9
9
  controller.response.link(controller.url_for(request.params.merge(:page => page - 1)), :rel => "prev") if page > 1
10
10
  controller.response.link(controller.url_for(request.params.merge(:page => page + 1)), :rel => "next") if total_pages && page < total_pages
11
11
  controller.response.link(controller.url_for(request.params.merge(:page => total_pages)), :rel => "last") if total_pages
12
- controller.response.headers["X-Total-Pages"] = total_pages if total_pages
12
+ controller.response.headers["X-Total-Pages"] = total_pages.to_s if total_pages
13
13
  end
14
14
  super
15
15
  end
@@ -135,6 +135,6 @@ class PaginateResponderTest < ActionController::TestCase
135
135
  def test_headers_total_pages
136
136
  get :index, :format => :json
137
137
 
138
- assert_equal "14", response.headers["X-Total-Pages"].to_s
138
+ assert_equal "14", response.headers["X-Total-Pages"]
139
139
  end
140
140
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginate-responder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  segments:
62
62
  - 0
63
- hash: -2632353665928065861
63
+ hash: 3362821720286290426
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  segments:
71
71
  - 0
72
- hash: -2632353665928065861
72
+ hash: 3362821720286290426
73
73
  requirements: []
74
74
  rubyforge_project:
75
75
  rubygems_version: 1.8.24