lib/neo4j/active_rel/persistence.rb in neo4j-3.0.0.rc.2 vs lib/neo4j/active_rel/persistence.rb in neo4j-3.0.0.rc.3

- old
+ new

@@ -28,11 +28,11 @@ def create_model(*) confirm_node_classes create_magic_properties set_timestamps properties = convert_properties_to :db, props - rel = _create_rel(properties) + rel = _create_rel(from_node, to_node, properties) init_on_load(rel, to_node, from_node, @rel_type) true end module ClassMethods @@ -67,11 +67,10 @@ raise ModelClassInvalidError, "Node class was #{node.class}, expected #{self.class.send(check)}" end end end - def _create_rel(*args) - session = self.class.neo4j_session + def _create_rel(from_node, to_node, *args) props = self.class.default_property_values(self) props.merge!(args[0]) if args[0].is_a?(Hash) set_classname(props) from_node.create_rel(type, to_node, props) end