From 2f07af6f4298a79bd8e5693509c312dedffbe21a Mon Sep 17 00:00:00 2001 From: Marcin Olichwirowicz Date: Mon, 5 Jan 2015 18:10:39 +0100 Subject: [PATCH] Remove route_info from params (Close #789) --- lib/grape/http/request.rb | 1 + spec/grape/integration/rack_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/grape/http/request.rb b/lib/grape/http/request.rb index 011e1fd358..393c1fa854 100644 --- a/lib/grape/http/request.rb +++ b/lib/grape/http/request.rb @@ -7,6 +7,7 @@ def params args = env['rack.routing_args'].dup # preserve version from query string parameters args.delete(:version) + args.delete(:route_info) params.deep_merge!(args) end params diff --git a/spec/grape/integration/rack_spec.rb b/spec/grape/integration/rack_spec.rb index c1f69505b4..f718d3cf1f 100644 --- a/spec/grape/integration/rack_spec.rb +++ b/spec/grape/integration/rack_spec.rb @@ -23,7 +23,7 @@ # can't check explicitly version of Rack because of https://github.com/rack/rack/issues/773 pending 'Rack 1.6.0 is required' unless ::Rack.const_defined?(:TempfileReaper) || RUBY_PLATFORM == 'java' - expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array(%w(route_info test)) + expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array('test') ensure input.close input.unlink