Sha256: b15a285f655a8f10dae545116cfa2f16a1cdc936c9f6eb96194b0bba901578c6

Contents?: true

Size: 406 Bytes

Versions: 8

Compression:

Stored size: 406 Bytes

Contents

module Neo4j
  module Rails
    # close lucene connections
    # reset the Neo4j.threadlocal_ref_node (Multitenancy)
    class RackMiddleware  #:nodoc:
      def initialize(app)
        @app = app
      end

      def call(env)
        @app.call(env)
      ensure
        Neo4j::Rails::Model.close_lucene_connections
        Neo4j.threadlocal_ref_node = Neo4j.default_ref_node
      end
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
neo4j-2.0.0.alpha.5-java lib/neo4j/rails/rack_middleware.rb
neo4j-2.0.0.alpha.4-java lib/neo4j/rails/rack_middleware.rb
neo4j-2.0.0.alpha.3-java lib/neo4j/rails/rack_middleware.rb
neo4j-1.3.1-java lib/neo4j/rails/rack_middleware.rb
neo4j-1.3.0-java lib/neo4j/rails/rack_middleware.rb
neo4j-1.2.6-java lib/neo4j/rails/rack_middleware.rb
neo4j-1.2.5-java lib/neo4j/rails/rack_middleware.rb
neo4j-1.2.4-java lib/neo4j/rails/rack_middleware.rb