Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions lib/neo4j/active_node/labels/reloading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,9 @@ module Neo4j::ActiveNode::Labels
module Reloading
extend ActiveSupport::Concern

MODELS_TO_RELOAD = []

def self.reload_models!
MODELS_TO_RELOAD.each(&:constantize)
MODELS_TO_RELOAD.clear
end

module ClassMethods
def before_remove_const
associations.each_value(&:queue_model_refresh!)
MODELS_FOR_LABELS_CACHE.clear
WRAPPED_CLASSES.each { |c| MODELS_TO_RELOAD << c.name }
WRAPPED_CLASSES.clear
end
Neo4j::ActiveNode::Labels::WRAPPED_CLASSES.clear
Neo4j::ActiveNode::Labels.clear_wrapped_models
end
end
end