Forum: Ruby on Rails function to check a value exists or not in array in RoR

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Venkat E. (Guest)
on 2009-05-11 16:52
Hello,

I need a function "to check a value exists or  not  in array" in RoR

Please help....
Colin L. (Guest)
on 2009-05-11 16:57
(Received via mailing list)
Check out the docs for ruby Array.  You will find a function
array.include?
there.

2009/5/11 Venkat E. <removed_email_address@domain.invalid>
Venkat E. (Guest)
on 2009-05-11 17:28
Colin L. wrote:
> Check out the docs for ruby Array.  You will find a function
> array.include?
> there.
>
> 2009/5/11 Venkat E. <removed_email_address@domain.invalid>

Hey...
thank you... very much.. 4 a fast reply...
Now my code is working :-)
This topic is locked and can not be replied to.