2009/1/29 Newb Newb <revathy.p / angleritech.com>:
> Is this possible to check for two strings.
> i want to check whether these two params exits i want to proceed the
> process
> i get two strings through form
> search_string_1 = params[:first_name]
> search _string_2 = params[:second_name]
> if folder_name.include?(search_string_1)(search_string_2)

What kind of test do you want? Do you want both or at least one of them?

[search_string_1,search_string_2].all? {|s| folder_name.include? s}
[search_string_1,search_string_2].any? {|s| folder_name.include? s}

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end