Method: Mongify::Configuration#mongodb_connection

Defined in:
lib/mongify/configuration.rb

#mongodb_connection(options = {}, &block) ⇒ Object

Returns a no_sql_connection which is bound to a mongodb adapter or builds a new no_sql_connection if block is given



22
23
24
25
26
27
# File 'lib/mongify/configuration.rb', line 22

def mongodb_connection(options={}, &block)
  return @mongodb_conncetion if @mongodb_connection and !block_given?
  options.stringify_keys!
  options['adapter'] ||= 'mongodb'
  @mongodb_connection = no_sql_connection(options, &block)
end