Permalink
Browse files

support pagination for mounted sub apps in padrino

  • Loading branch information...
1 parent 82a38e0 commit 69f87ec9137796065b71534e2b3f0cb719e8f2c1 Lester Celestial committed Jun 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/kaminari/helpers/sinatra_helpers.rb
@@ -78,7 +78,7 @@ module HelperMethods
# * <tt>:remote</tt> - Ajax? (false by default)
# * <tt>:ANY_OTHER_VALUES</tt> - Any other hash key & values would be directly passed into each tag as :locals value.
def paginate(scope, options = {}, &block)
- current_path = env['PATH_INFO'] rescue nil
+ current_path = env['REQUEST_PATH'] rescue nil
current_params = Rack::Utils.parse_query(env['QUERY_STRING']).symbolize_keys rescue {}
paginator = Kaminari::Helpers::Paginator.new(
ActionViewTemplateProxy.new(:current_params => current_params, :current_path => current_path, :param_name => options[:param_name] || Kaminari.config.param_name),

0 comments on commit 69f87ec

Please sign in to comment.