lib/neo4j/active_node/property.rb in neo4j-5.0.15 vs lib/neo4j/active_node/property.rb in neo4j-5.1.0.rc.1
- old
+ new
@@ -1,13 +1,13 @@
module Neo4j::ActiveNode
module Property
extend ActiveSupport::Concern
include Neo4j::Shared::Property
- def initialize(attributes = {}, options = {})
- super(attributes, options)
- @attributes ||= self.class.attributes_nil_hash.dup
+ def initialize(attributes = nil)
+ super(attributes)
+ @attributes ||= Hash[self.class.attributes_nil_hash]
send_props(@relationship_props) if _persisted_obj && !@relationship_props.nil?
end
module ClassMethods
# Extracts keys from attributes hash which are associations of the model
@@ -20,9 +20,10 @@
end
private
def contains_association?(attributes)
+ return false unless attributes
attributes.each_key { |key| return true if associations_keys.include?(key) }
false
end
end
end