Hi,
how can I do to rtemove an elemnt from an array,
I have this array :
“user”=>{“password_confirmation”=>"", “screen_name”=>“sdfsdfsdfsdf”,
“first_name”=>“sdfsdfsd”, “last_name”=>“dskkd”, “password”=>"",
“email”=>“[email protected]”}
And I want to remove the elements “password_confirmation” and
“password”.
How should I do this. I found nothing in docs, setting them to nil it’s
not an option
thanks
J. mp wrote:
Hi,
how can I do to rtemove an elemnt from an array,
I have this array :
“user”=>{“password_confirmation”=>"", “screen_name”=>“sdfsdfsdfsdf”,
“first_name”=>“sdfsdfsd”, “last_name”=>“dskkd”, “password”=>"",
“email”=>“[email protected]”}
And I want to remove the elements “password_confirmation” and
“password”.
How should I do this. I found nothing in docs, setting them to nil it’s
not an option
thanks
sorry for making loosing your time. I’m a looser 
it’s from an Hash and not from and array
Hi –
On Mon, 12 Feb 2007, J. mp wrote:
“password”.
How should I do this. I found nothing in docs, setting them to nil it’s
not an option
thanks
sorry for making loosing your time. I’m a looser 
it’s from an Hash and not from and array
See the docs for Hash#delete, Hash#delete_if, and Hash#reject! (That
exclamation point is part of the method name.)
David