Permalink
Browse files

support pagination in mounted sub apps

  • Loading branch information...
1 parent 69f87ec commit f1a27509213769642fe70b4680b4f03e94abeb2c Lester Celestial committed Jun 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/kaminari/helpers/sinatra_helpers.rb
@@ -110,7 +110,7 @@ def link_to_next_page(scope, name, options = {})
placeholder = options.delete(:placeholder)
query = params.merge(param_name => (scope.current_page + 1))
unless scope.last_page?
- link_to name, env['PATH_INFO'] + (query.empty? ? '' : "?#{query.to_query}"), options.reverse_merge(:rel => 'next')
+ link_to name, env['REQUEST_PATH'] + (query.empty? ? '' : "?#{query.to_query}"), options.reverse_merge(:rel => 'next')
else
placeholder
end

0 comments on commit f1a2750

Please sign in to comment.