lib/neo4j/active_rel/rel_wrapper.rb in neo4j-5.0.0 vs lib/neo4j/active_rel/rel_wrapper.rb in neo4j-5.0.1
- old
+ new
@@ -1,10 +1,9 @@
class Neo4j::Relationship
module Wrapper
def wrapper
props.symbolize_keys!
- # return self unless props.is_a?(Hash)
begin
most_concrete_class = sorted_wrapper_classes
wrapped_rel = most_concrete_class.constantize.new
rescue NameError
return self
@@ -19,9 +18,9 @@
def sorted_wrapper_classes
props[Neo4j::Config.class_name_property] || class_from_type
end
def class_from_type
- Neo4j::ActiveRel::Types::WRAPPED_CLASSES[rel_type] || rel_type.camelize
+ Neo4j::ActiveRel::Types::WRAPPED_CLASSES[rel_type] || Neo4j::ActiveRel::Types::WRAPPED_CLASSES[rel_type] = rel_type.camelize
end
end
end