Skip to content

Commit

Permalink
Remove route_info from params (Close #789)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodzyn committed Jan 5, 2015
1 parent 811eca6 commit 2f07af6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/grape/http/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/grape/integration/rack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f07af6

Please sign in to comment.