File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def _paginate_collection(collection, options={})
4646 headers [ 'Link' ] = links . join ( ', ' ) unless links . empty?
4747 headers [ per_page_header ] = options [ :per_page ] . to_s
4848 headers [ page_header ] = options [ :page ] . to_s unless page_header . nil?
49- headers [ total_header ] = total_count ( collection , options ) if include_total
49+ headers [ total_header ] = total_count ( collection , options ) . to_s if include_total
5050
5151 return collection
5252 end
Original file line number Diff line number Diff line change 212212
213213 specify do
214214 get :index_with_paginate_array_options , params : params
215+
216+ expect ( response . header [ 'Total' ] ) . to be_kind_of ( String )
215217 expect ( response . header [ 'Total' ] . to_i ) . to eq total_header
216218 end
217219 end
You can’t perform that action at this time.
0 commit comments