lib/neo4j/active_node/labels.rb in neo4j-3.0.0.rc.5 vs lib/neo4j/active_node/labels.rb in neo4j-3.0.0

- old
+ new

@@ -84,10 +84,10 @@ # @param [Hash] args of arguments to find def find_by(*args) self.query_as(:n).where(n: eval(args.join)).limit(1).pluck(:n).first end - # Like find_by, except that if no record is found, raises a RecordNotFound error. + # Like find_by, except that if no record is found, raises a RecordNotFound error. def find_by!(*args) a = eval(args.join) find_by(args) or raise RecordNotFound, "#{self.query_as(:n).where(n: a).limit(1).to_cypher} returned no results" end