We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb04ad6 + 2884752 commit 65d2b86Copy full SHA for 65d2b86
lib/api-pagination.rb
@@ -22,7 +22,7 @@ def paginate(scope)
22
%(<#{url}?#{new_params.to_param}>; rel="#{k}")
23
end
24
25
- headers['Link'] = links.join(', ')
+ headers['Link'] = links.join(', ') unless links.empty?
26
27
28
spec/controllers/numbers_controller_spec.rb
@@ -34,7 +34,7 @@ def index
34
context 'without enough items to give more than one page' do
35
it 'should not paginate' do
36
get :index, count: 20
37
- response.headers['Link'].should be_blank
+ response.headers.keys.should_not include("Link")
38
39
40
0 commit comments