lib/neo4j/active_node/labels.rb in neo4j-5.2.2 vs lib/neo4j/active_node/labels.rb in neo4j-5.2.3
- old
+ new
@@ -1,10 +1,11 @@
module Neo4j
module ActiveNode
# Provides a mapping between neo4j labels and Ruby classes
module Labels
extend ActiveSupport::Concern
+ include Neo4j::ActiveNode::Labels::Reloading
WRAPPED_CLASSES = []
MODELS_FOR_LABELS_CACHE = {}
MODELS_FOR_LABELS_CACHE.clear
@@ -73,19 +74,11 @@
def self.clear_wrapped_models
WRAPPED_CLASSES.clear
end
- protected
-
module ClassMethods
include Neo4j::ActiveNode::QueryMethods
-
- def before_remove_const
- associations.each_value(&:queue_model_refresh!)
- MODELS_FOR_LABELS_CACHE.clear
- WRAPPED_CLASSES.clear
- end
# Returns the object with the specified neo4j id.
# @param [String,Integer] id of node to find
def find(id)
map_id = proc { |object| object.respond_to?(:id) ? object.send(:id) : object }