I have a rails model (Comment) which is based on neo4j.rb. My simple method should return the number of children, but is instead returning a LocalJumpError (no block given (yield)). What am I doing wrong?
has_many :both, :children, model_class: Comment, unique: true
def get_number_of_replies
if children.count == 0
0
else
children.count + children.each.get_number_of_replies
end
end