Module: Neo4j::Rails::HasN::ClassMethods
- Defined in:
- lib/neo4j/rails/has_n.rb
Instance Method Summary (collapse)
-
- (Object) has_n(*args)
(also: #has_many)
Create a number of methods similar to active record has_many.
-
- (Object) has_one(*args)
Declares ONE incoming or outgoing relationship.
Instance Method Details
- (Object) has_n(*args) Also known as: has_many
Create a number of methods similar to active record has_many. The first one returns an Relationships::NodesDSL the second generate method (with the _rels postfix) returns a Relationships::RelsDSL
See also Neo4j::NodeMixin#has_n which only work with persisted relationships.
61 62 63 64 |
# File 'lib/neo4j/rails/has_n.rb', line 61 def has_n(*args) = args. define_has_n_methods_for(args.first, ) end |
- (Object) has_one(*args)
Declares ONE incoming or outgoing relationship
93 94 95 96 |
# File 'lib/neo4j/rails/has_n.rb', line 93 def has_one(*args) = args. define_has_one_methods_for(args.first, ) end |