lib/nobrainer.rb
# Note: we always access the connection explicitly, so that in the future,
# we can refactor to return a connection depending on the context.
# Note that a connection is tied to a database in NoBrainer.
we always access the connection explicitly, so that in the future,
we can refactor to return a connection depending on the context.
Note that a connection is tied to a database in NoBrainer.
we always access the connection explicitly so that in the future we can refactor to return a connection depending on the context . Note that a connection is tied to a database in NoBrainer .
def disconnect_if_url_changed
      if @connection && @connection.uri != NoBrainer::Config.rethinkdb_url
        disconnect
      end
    end
def disconnect_if_url_changed if @connection && @connection . uri != NoBrainer :: Config . rethinkdb_url disconnect end end
Note: we always access the connection explicitly, so that in the future,
we can refactor to return a connection depending on the context.
Note : we always access the connection explicitly so that in the future we can refactor to return a connection depending on the context .