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(={}, &block) return @mongodb_conncetion if @mongodb_connection and !block_given? .stringify_keys! ['adapter'] ||= 'mongodb' @mongodb_connection = no_sql_connection(, &block) end |