lib/neo4j/railtie.rb in neo4j-5.2.2 vs lib/neo4j/railtie.rb in neo4j-5.2.3
- old
+ new
@@ -3,9 +3,15 @@
module Neo4j
class Railtie < ::Rails::Railtie
config.neo4j = ActiveSupport::OrderedOptions.new
+ if const_defined?(:ActionDispatch)
+ ActionDispatch::Reloader.to_prepare do
+ Neo4j::ActiveNode::Labels::Reloading.reload_models!
+ end
+ end
+
# Add ActiveModel translations to the I18n load_path
initializer 'i18n' do
config.i18n.load_path += Dir[File.join(File.dirname(__FILE__), '..', '..', '..', 'config', 'locales', '*.{rb,yml}')]
end