How to have a duplicate copy of params?

Hi all,
I wanted to know how to keep a duplicate copy of params which I can
use it for another operation, Is there any method…?

You could store it in the session hash temporarily?

What is it you’re trying to achieve?

duplicate_params = params

2009/4/22 Santosh T. [email protected]

Colin L. wrote:

duplicate_params = params

2009/4/22 Santosh T. [email protected]

I want to use merge function… for params… can I use it.

Use:

params_copy = params.dup

then you can change/add/delete items in both hashes (and in nested
hashes if any), they are complitely independent.

Dmitry

Dmitry S. wrote:

Use:

params_copy = params.dup

then you can change/add/delete items in both hashes (and in nested
hashes if any), they are complitely independent.

Dmitry

Thank You.

Yes, please use the dup method for copy values.
Sometimes ,most programmers change to use the ROR because of the
Rails. So many of them can’t use the Ruby very well.
So I suggest you can study the Ruby now.

On Apr 22, 5:07 pm, Santosh T. <rails-mailing-l…@andreas-