def find_by(conditions = {})
      to_a.detect do |record|
        Find.new(record).is_of(conditions)
      end
    end
def find_by(conditions = {})
      to_a.detect do |record|
        Find.new(record).is_of(conditions)
      end
    end
Finds the first record matching the specified conditions. There
 is no implied ordering so if order matters, you should specify it
 yourself.

 If no record is found, returns <tt>nil</tt>.

   Post.find_by name: 'Spartacus', rating: 4