I want to find all Foos that are not yet associated with my Bar. I use neo4j.rb (4.1.2) and Rails (4.2). The code I use now, that produces the right output but feels unoptimal is:
@foos = Foo.all.find_all do |foo|
foo.bars.rels_to(current_bar).count == 0
end
Is there a better way of doing this with Cypher?