lib/pagy/extras/items.rb in pagy-0.11.1 vs lib/pagy/extras/items.rb in pagy-0.11.2

- old
+ new

@@ -22,10 +22,10 @@ module Frontend # This works with all Rack-based frameworks (Sinatra, Padrino, Rails, ...) def pagy_url_for(page, pagy) - p_vars = pagy.vars; params = request.GET.merge(p_vars[:page_param] => page, p_vars[:items_param] => p_vars[:items], **p_vars[:params]) + p_vars = pagy.vars; params = request.GET.merge(p_vars[:page_param] => page, p_vars[:items_param] => p_vars[:items]).merge!(p_vars[:params]) "#{request.path}?#{Rack::Utils.build_nested_query(pagy_get_params(params))}#{p_vars[:anchor]}" end # Return the items selector HTML. For example "Show [20] items per page" def pagy_items_selector(pagy, id=caller(1,1)[0].hash)