Hi
I have two arrays of items, and I want to cycle one and see if its
items are on the other one, but I can’t find out how to do it… I’ve
been trying to do something like this
@a = Item.find(:all, :conditions => “name LIKE ‘%a%’”)
@b = Item.find(:all, :conditions => “name LIKE ‘%b%’”)
for i in @a
if @a.find(i)
do stuff
else
do something else
end
end
and I keep getting a “no block given” error on the if line… if @a is
an array, i can search using find, and I believe I can use the
object… I’ve tried a find_by_id but I got an “undefined method for
array” error…
Any ideas?
Thanks
Carlos Fonseca