Hi --

On Mon, 12 Feb 2007, J. mp wrote:

> 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"=>"asdasd / sdksd.cpd"}
>>
>> 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

See the docs for Hash#delete, Hash#delete_if, and Hash#reject!  (That
exclamation point is part of the method name.)


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)