Rewriting ugly find call in Ruby.