Sha256: 0000d72ffa30a03f2c40d5edca85e00326deee4d5dce484d0208cc8cc37c4b08
Contents?: true
Size: 940 Bytes
Versions: 42
Compression:
Stored size: 940 Bytes
Contents
module ActiveGraph::Shared # This module adds the `serialize` class method. It lets you store hashes and arrays in Neo4j properties. # Be aware that you won't be able to search within serialized properties and stuff use indexes. If you do a regex search for portion of a string # property, the search happens in Cypher and you may take a performance hit. # # See type_converters.rb for the serialization process. module SerializedProperties extend ActiveSupport::Concern def serialized_properties self.class.serialized_properties end def serializable_hash(*args) super.merge(id: id) end module ClassMethods def inherited(other) inherit_serialized_properties(other) if self.respond_to?(:serialized_properties) super end def inherit_serialized_properties(other) other.serialized_properties = self.serialized_properties end end end end
Version data entries
42 entries across 42 versions & 1 rubygems