方法" rel_length"在Neo4j.rb中不起作用。

时间:2016-02-04 05:04:24

标签: ruby-on-rails neo4j social-networking neo4j.rb

我需要得到朋友的朋友" User。所以,friend(rel_length: 2)不起作用(忽略方法),回归朋友。

class User
  include Neo4j::ActiveNode
  ...
  has_many :out, :friend, rel_class: Friend
  ...
end

class Friend
  include Neo4j::ActiveRel
  from_class User
  to_class User
  type 'friend'

  property :activity, type: String
  property :relation, type: String
  property :token, type: String
end

1 个答案:

答案 0 :(得分:0)

对于后来发现这个的人来说,原因是因为他使用的是旧版本的宝石(见评论)