lib/neo4j/railtie.rb in neo4j-7.0.16 vs lib/neo4j/railtie.rb in neo4j-7.1.0
- old
+ new
@@ -5,10 +5,14 @@
module Neo4j
class Railtie < ::Rails::Railtie
config.neo4j = ActiveSupport::OrderedOptions.new
- if const_defined?(:ActionDispatch)
+ if defined?(ActiveSupport::Reloader)
+ ActiveSupport::Reloader.to_prepare do
+ Neo4j::ActiveNode::Labels::Reloading.reload_models!
+ end
+ elsif const_defined?(:ActionDispatch)
ActionDispatch::Reloader.to_prepare do
Neo4j::ActiveNode::Labels::Reloading.reload_models!
end
end