Rails: combining multiple find requests
- by peppermonkey
What I want to do is something like this:
searchid = 4
while searchid != -1
@a += A.find(searchid)
@b = B.find(searchid)
searchid = @b.parentid
end
The problem being the line
@a += A.find(searchid)
The error being something like
NoMethodError: undefined method `+' for #
So, how do you combine multiple 'find' requests?