• E
    Don't wrap parameters if key already exists · b3966080
    Eugene Kenny 提交于
    We shouldn't perform parameter wrapping if it would overwrite one of the
    parameters sent with the request, as that would interfere with reading
    the parameter directly from the top level `params` hash.
    
    The current implementation has logic for this case, but it doesn't
    handle `nil`/`false` values, which means these parameters:
    
        { "user" => nil }
    
    are transformed into this `params` hash:
    
        { "user" => { "user" => nil } }
    
    and `params["user"]` no longer returns the original parameter value.
    b3966080
params_wrapper_test.rb 12.4 KB