Skip to content

Commit

Permalink
remove name and default keys from params hash
Browse files Browse the repository at this point in the history
  • Loading branch information
subvertallchris committed Mar 16, 2015
1 parent 3013741 commit 38456e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/neo4j/session.rb
Expand Up @@ -95,9 +95,14 @@ class << self
#
# @see also Neo4j::Server::CypherSession#open for :server_db params
# @param db_type the type of database, e.g. :embedded_db, or :server_db
# @param [String] endpoint_url The path to the server, either a URL or path to embedded DB
# @param [Hash] params Additional configuration options
def open(db_type = :server_db, endpoint_url = nil, params = {})
validate_session_num!(db_type)
register(create_session(db_type, endpoint_url, params), params[:name], params[:default])
name = params[:name]
default = params[:default]
[:name, :default].each { |k| params.delete(k) }
register(create_session(db_type, endpoint_url, params), name, default)
end

# @private
Expand Down

0 comments on commit 38456e2

Please sign in to comment.