Use config.filter_parameters on in-browser request dump. [#4335 state:resolved]

This commit is contained in:
José Valim 2010-04-07 00:45:56 +02:00
parent 4c4fd1a60f
commit eb063538bd
2 changed files with 10 additions and 1 deletions

@ -6,7 +6,7 @@
<% end %>
<%
clean_params = @request.parameters.clone
clean_params = @request.filtered_parameters.clone
clean_params.delete("action")
clean_params.delete("controller")

@ -106,4 +106,13 @@ class ShowExceptionsTest < ActionController::IntegrationTest
assert_response 405
assert_match /ActionController::MethodNotAllowed/, body
end
test "does not show filtered parameters" do
@app = DevelopmentApp
get "/", {"foo"=>"bar"}, {'action_dispatch.show_exceptions' => true,
'action_dispatch.parameter_filter' => [:foo]}
assert_response 500
assert_match "&quot;foo&quot;=&gt;&quot;[FILTERED]&quot;", body
end
end