diff options
author | Tim Rogers <tim@gocardless.com> | 2016-07-08 17:48:21 +0100 |
---|---|---|
committer | Tim Rogers <tim@gocardless.com> | 2016-07-08 17:48:25 +0100 |
commit | 96070595697477676ea051c19c2c951901302bed (patch) | |
tree | f51d42c1b9bc6cdc8a6a7bc633365e81ec410dad /actionview/test/lib/controller | |
parent | ba3dd5ca04e1b70afab964d32f9c0a6f9cace61c (diff) | |
download | rails-96070595697477676ea051c19c2c951901302bed.tar.gz rails-96070595697477676ea051c19c2c951901302bed.tar.bz2 rails-96070595697477676ea051c19c2c951901302bed.zip |
Trust `Object#dup` in `ActionController::Parameters`, using `#initialize_copy` to manually duplicate the underlying parameters hash
It looks like `ActionController::Parameters#dup` is leftover from when the class inherited from `Hash`. We can just trust `#dup`, which already copies the `@permitted` instance variable (confirmed by tests). We still define a `#initialize_copy` to make `@parameters` a copy that can be mutated without affecting the original instance.
Diffstat (limited to 'actionview/test/lib/controller')
0 files changed, 0 insertions, 0 deletions